We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › tilting plane based on object mass + traer physics
Page Index Toggle Pages: 1
tilting plane based on object mass + traer physics (Read 2568 times)
tilting plane based on object mass + traer physics
Nov 6th, 2006, 4:27am
 
i want to make a 3d plane which tilts based on the mass of an x amount objects placed on the 3d plane. i thought i may be able to use the traer physics library but i can not think of how to apply my thoughts to a particle system. any thoughts?
Re: tilting plane based on object mass + traer phy
Reply #1 - Nov 6th, 2006, 5:15pm
 
the traer library doesn't have collision built into it, so the first problem you'd need to solve is collision. I suggest you check out this thread (http://processing.org/discourse/yabb_beta/YaBB.cgi?board=os_libraries_tools;action=display;num=1123794422)
to get what you need to use Odejava. It's a rigid-body physics engine with collision and so forth and you'd be able to build the system you're describing with it.
Re: tilting plane based on object mass + traer phy
Reply #2 - Nov 6th, 2006, 10:12pm
 
seems a little intense. id almost rather do the collision myself. the object will not be falling onto the plane. was thought about making a grid of particles and using simple distance equations to determine which particle the object should change in mass/position... but i wasnt sure how to make a grid that was rigid and would move like a plane with objects moving... tilting the plane in different directions based on the object/mass distribution.
Re: tilting plane based on object mass + traer phy
Reply #3 - Nov 6th, 2006, 10:19pm
 
I agree that Odejava is a bit intense. It took me a couple days just to wrap my head around the API. I think it's probably a good solution to fake it a bit.

You might try something like the method you just described but don't use particles in the plane. Just define it as a grid as if you were using particles, determine which direction it should tilt based on the object/mass distribution and then just tilt the plane yourself.

If you try to do it with a grid of particles connected by stiff springs, it probably won't behave quite right, or it might just explode.
Re: tilting plane based on object mass + traer phy
Reply #4 - Nov 7th, 2006, 1:25am
 
I'd have to agree with ddf, for your task, if you know the physics you're probably better off writing it from scratch, unfortunately creating a rigid, tilting platform with the traer physics library would probably do krazy things, and be hard to get the force acting right, as you'd have to do both the force from the platform on the mass, and mass on the platform, and not have them go in opposite directions somehow.
Re: tilting plane based on object mass + traer phy
Reply #5 - Nov 7th, 2006, 11:28pm
 
im actually uncertain about the algorithms required to make the physics simulation which is why i considered using the traer physics engine. where should i start.
Re: tilting plane based on object mass + traer phy
Reply #6 - Nov 8th, 2006, 1:58pm
 
Wondering if you could clarify a couple things, so I can better understand the problem you are trying to solve.

In your first post you say:
Quote:
i want to make a 3d plane which tilts based on the mass of an x amount objects placed on the 3d plane.


But then later you say:
Quote:
the object will not be falling onto the plane.


So do you plan to run the simulation such that the objects will start out ON the plane and not be dropped from above or something? Do you want the objects to roll down the plane when it tilts?
Re: tilting plane based on object mass + traer phy
Reply #7 - Nov 8th, 2006, 2:59pm
 
the objects will be on the plane at the start and they will roll in the direction of the planes tilt and the planes tilt directions will be based of the weight distribution of the objects on the plane. weight can be thought of as varying gravity applied to the plane.
Re: tilting plane based on object mass + traer phy
Reply #8 - Nov 10th, 2006, 7:53pm
 
Ok, this is what I'd suggest as a starting point.

Use particles for the objects. Give them a geometry, say a sphere to start off with. Use a downward gravity in the particle system. Then you'll want to do collision between the plane and the objects, figure out which way the plane should tilt based on the distribution of the objects on the plane and the gravity in the particle system combined with your collision code will take care of the rolling part.

This will not be particularly easy.

I would again suggest figuring out how to use ODEJava in Processing because it might take just as long to figure out the collision/tilting code for a "faked" simulation. Also, by using ODEJava you already have a range of shapes at your disposal and you won't have to figure out collision for them yourself.
Re: tilting plane based on object mass + traer phy
Reply #9 - Nov 10th, 2006, 8:18pm
 
thanks ddf. hm the odejava site bandwidth has been exceeded since the day you suggested odejava. where can i view a documentation and etc.
Page Index Toggle Pages: 1