Can Newton do 2D physics ?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Can Newton do 2D physics ?

Postby rocketmagnet » Thu Oct 16, 2008 2:53 pm

Hi all,

I am looking for a physics engine for a CAD package I'm writing. Most of the physics will be happening in 2D, and I was wondering if Newton can take advantage of this to allow me to have a very large number of objects?

BTW, all the objects are the same kinda shape, rectangles with hemispherical endcaps. Look a bit like those drug capsules.

Many thanks

Hugo
rocketmagnet
 
Posts: 1
Joined: Thu Oct 16, 2008 2:48 pm

Re: Can Newton do 2D physics ?

Postby JernejL » Thu Oct 16, 2008 3:53 pm

Ofcourse, just apply a upvector joint to your object and reset the specific plane coordinate during transform callback so that they will only rotate along one axis and move along 2, and will be therefore your body will be limited to a 2D space.

But julio should tell you weither this is a good idea? to change transformation during transform callback.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1531
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Can Newton do 2D physics ?

Postby sea » Thu Oct 30, 2008 3:56 pm

I made it exactly like Delfi said, so I'm wondering about the solution. Maybe 2.0 could support some 2D "hacks" :)? Anyway, I use this method and, of course, I use some fixed depth of object I simulate. It's important to find some optimal value of constant depth, because too large is less precise and slower and too small is, erm, just similar (moreover, objects can fly through the others more easily). I use constant depth equals to 0.1 and it's enough for my needs.
sea
 
Posts: 19
Joined: Mon Dec 17, 2007 5:20 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests