Omega limit

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Omega limit

Postby Julien Mercier » Tue May 25, 2010 6:24 am

Hello everyone,

I'm actualy working with an HingeJoint and having some troubles. I checked this forum but couldn't find any answer so i'm posting.

I would know if HingeJoint have an omega absolute limit : in fact, omega never goes above 94.

If anyone has some info about it,i would appreciate.

Regards,

Julien Mercier.
Julien Mercier
 
Posts: 2
Joined: Tue May 25, 2010 6:06 am

Re: Omega limit

Postby Julio Jerez » Tue May 25, 2010 7:23 am

Omegas are clamped to less than half spin in one time step.

if you have something spinning that fast you must simulate a much higher frame per second, 600 or 1000 fps, to avoid the larger errors introduced by the sampling rate principle.

Basically if you have a spinning body the takes more than half a revolution in one time step, then there is not way to determine of the object tall the right turn or the left turn.
this is a not a limitation of Newton engine, this Is a fundamental law of physics and Information call the
Nyquizt Shannon theorem.

In fact that principle is use to measure the speed of spinning objects by using a intermitting flash light called stroboscopic that emit a pulsing light at a fix rate, then when the spinning object look as if is stopped spinning, but reading the frequency of the flash light you can know the speed of the spinning objects.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Omega limit

Postby Julien Mercier » Tue May 25, 2010 8:42 am

Thanks for the reply,

Worked perfectly with a higher FPS, thanks a lot :)

Regards,

Julien Mercier.
Julien Mercier
 
Posts: 2
Joined: Tue May 25, 2010 6:06 am

Re: Omega limit

Postby rajan » Thu Feb 24, 2011 8:24 am

Hi,

Hi too facing the same problem, I am restricted with omega 75. How did you managed to solve this issue?. How do change the FPS?

Please help me!

Rajan
rajan
 
Posts: 2
Joined: Thu Feb 24, 2011 8:21 am

Re: Omega limit

Postby Julio Jerez » Thu Feb 24, 2011 9:03 am

pass a smaller time step
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Omega limit

Postby rajan » Sat Feb 26, 2011 12:32 am

Thanks it is working now but it seems the simulation is not realtime anymore :cry:

Rajan
rajan
 
Posts: 2
Joined: Thu Feb 24, 2011 8:21 am

Re: Omega limit

Postby Julio Jerez » Sat Feb 26, 2011 7:58 am

you need to make call wit teh smaller time step until you cover teh time pass sinc eteh last update.

look at the dThread class in teh containers library in the newton demos, or in the tutorials to see how to decouple the simulation from the display rate.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Omega limit

Postby collerblade » Sat May 18, 2013 10:32 am

Sorry for waking up the old topic, but i dont understand why is this limitation is nessesery. Bodies have only matrices and vectors (as far as i know), why is this so important. No matter the rotation speed matrices are allways correct, and from martices u can calulate anything. I think there is no need to know if the object turned left or right? It can turn multiple times in 1 framerate. Collisions are caculated with the current body-matrix. Angular speed is only a 3 dimensional vector (as far as i know).. sorry but i dont see any limitations here.

I write my little car simulator, and the whels cant turn fast enough... ok -> increasse framerate, but that put serius extra work for the cpu. And anything else is fine with 60fps, but for the car i need over 150fps, for high speed.

Ty
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: Omega limit

Postby Julio Jerez » Sat May 18, 2013 11:43 am

The is not something I do capriciously. this is actually a fundamental fact of nature. It is call the sapling rate theorem.

you can see every day when you drive on a street and you see a car wheel spinning under some 60 hertz street light.
as the wheel spin faster you sat to see spinning is reverse.

Basically what happen is that the light take images of the wheel at 60 hertz but if the wheel spin by one revolution between shots, then you can no determine of the wheel perform one revolution of not.
you can read about the people who formulated that mathematic of that phenomenon
http://www.princeton.edu/~achaney/tmve/wiki100k/docs/Nyquist%E2%80%93Shannon_sampling_theorem.html

The deduced that the a absolute minimum sampling rate necessary to recreate an continue signal is twice the maximum frequency of the continue signal.
the is the actual limit, in practice to recreate the signal the sampling rate should be about a four time the max frequency.

In a simulation of a spinning object there translate as follows. The sampling rate is the frequency at with the simulation calculate the force and torque to enforce the spinning motion.
The continue signal is the object that you are simulation.
if the object spin so fact the each time to calculate a correction, the correcting tend to increase the error because the objet did a full revolution.
for the correction to be effective the objet can no spin more than one quarter of the simulation rate.

do no blame me blame Nyquist–Shannon sampling theorem, this is a fact of nature and there is nothing I can no about.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Omega limit

Postby Julio Jerez » Sat May 18, 2013 11:48 am

is the reason that you are doing this because you want to spin a vehicle tire?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Omega limit

Postby collerblade » Sun May 19, 2013 7:55 am

y i like multibodycar, and i did my own implementation (using user defined joints). But i need 300fps for reaseable car speed (about 250km/h). I know there is vehicle without body-tires, but the motion seems more realistic when tires are bodies. Specially in low speeds.

I know the rules of signal processing. There is no problem with those..
i just dont see why it is nesssery for a body simulation. I wrote my own litte simulation stuff, i used euler integration. u sure know:

v+=a*dt;
p+=v*dt;

same with rotations:

omega+=torque*dt;
rotation+=omega*dt;

i used quaternions, and they worked good. Im sure your integration is far more advanced then euler, but i dont see, where the limitations come in. Maybe its my blindness :D But i used only the current state of any body. So i dont want to know how the object turned right or left. My collision system sees only the current state, nothing else. Maybe newton works other ways, but in this system i dont have any rotation limitations.

Any suggestions?
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: Omega limit

Postby Julio Jerez » Sun May 19, 2013 9:24 am

collerblade wrote:y i like multibodycar, and i did my own implementation (using user defined joints). But i need 300fps for reaseable car speed (about 250km/h). I know there is vehicle without body-tires, but the motion seems more realistic when tires are bodies. Specially in low speeds.

who say that there is a vehicle without body tires? this is no true. all vehicle in Newton now and in the pass has being contractions of multi bodies connected by joints. Pleases do no keep speeding those statements that that the detractors on the established has spread about this library for years.
It is simple not true.
Newton 200 I was experimenting with a ray cast car and a quickly realized that the was not going to yield the result I wanted, I left it because David Gravel like it and worked on that joint for some time making a cool archaedy demo. But the multi body car was always there.
In core 300 I remove that joint and made a Vehicle that uses is special set of joint tires to calculate the joint forces and tires generated by tires, this is the same model I was using in core 1.50 but the I never converted to core 200.

collerblade wrote:I know the rules of signal processing. There is no problem with those..
i just dont see why it is nesssery for a body simulation. I wrote my own litte simulation stuff, i used euler integration. u sure know:
v+=a*dt;
p+=v*dt;
same with rotations:
omega+=torque*dt;
rotation+=omega*dt;
i used quaternions, and they worked good. Im sure your integration is far more advanced then euler, but i dont see, where the limitations come in. Maybe its my blindness :D But i used only the current state of any body. So i dont want to know how the object turned right or left. My collision system sees only the current state, nothing else. Maybe newton works other ways, but in this system i dont have any rotation limitations.
Any suggestions?


if you know the rules of signal possessing then why you say that you do no see any problem there?
Any digital simulation of a real proses is digital signal proses.
the equation you show are very simple, and of course you do no see the problem there, but thso eare no the complete equation of a laws physics.

The complete equation is this

d p / d t = F
d l / d t = T

t = time
p = linear momentum
l = angular momentum
F= next force acting on a body
T = next torque acting on a body

it reads,
the time derivative of the linear momentum equal to the next force actin on a body
the time derivative of the angular momentum equal to the next force actin on a body

time derivative mean any king of changes,
Take for example the equations that you show in you post.
a particle moving on a straight line pushed by a force, its velocity is changing, therefore it momentum is changing
the equation I posted say that that change of momentum is equal to the force that push the parcel, no problem there.

but now consider the same particle movement on a circular path around a center, like the moon around the earth. Gravity is pulling the moon, but the moon keeps its path and do not fall to the planet.
It looks like nothing is pushing the moon to counter the gravity, but there must be something that is keeping on a circular path.
when you apply the first equation to the motion of the moon, you will realized that the linear momentum magnify reaming constant, by it orientation is changing, the time derivative of that motion
produce a non zero vector perpendicular to the trajectory that we called centripetal acceleration.

Now this motion is periodic, if you make a simulation, the motion on the moon around the earth and you apply the gravity, and the centripetal acceleration only once a day. you moon will move on a perfect straight path. never curving it.

Shannon theorem says that at the minimum the simulation should apply an update once every 12 hours.
but you can see that this will only give you the notion of a circular periodic path, but not an accurate one
as you apply updates at a higher rate the simulation approaches the real motion of the moon, for example an update every one pour is very good for say a year of motion. for millions of year you will need and update maybe every second, and for billions of years you need maybe one every millisecond or so.

How does these apply to angular motion? well the principle is the same, you can see a body and a collision of particles connected to a center of mass by solid link. when the body rotates and change it orientation, the linear momentum of each particle change direction just like the move above, therefore a spinning body with a irregular change most be generation an non zero force the push the body on some direction. we call this precessing forces. for example tops.

Simulation bodies as collection of particle is very hard, but for that we have the second equation thanks to Leonard Euler. he discovered that the when a body is spinning around a fix axis the sum of the linear momentum of all particles is zero, he call this sum the angular momentum.
so angular momentum is just the summation of a whole bunk of linear momentums and therefore most obey the same laws of linear motion, conservation and inertia.

So how we can see that is linear momentum does no change then a body preserve it linear velocity
if angular momentum does no change then a spinning body preserve its angular velocity, the only way that can happens is if the body rotate around a fix axis.

this is what explain the very object in this universe rotates around a fix axis. (we call the plane of the galaxy, the plane of the solar system, of the plane of the moon and earth)

when a spherical body is spinning the trajectory of each particle is still circular therefore the do not generate pressing torque.

but when a body is not spherical, the only way the each particle can fallow a contact circular trajectory is if the spinning around a fix axis, and Euler discovered that the axis is the principal axis of inertia of the body.
so when a spinning body change is trajectory the body will generate a non zero torque top resist that motion, this is Inertia (Newton for Law of motion) and is what explain why the galaxies, the solar system, the moon and earth, tops an car tires generate the estrange torque when the they spin, it is the effect of each particle trying to preserve its current motion.

Now why I explain all of this, I do because Newton is a realistic physic simulator that world by applying those two equations, as opposed to most other physic engine that work by applying instantaneous impulses that operate directly on the velocity of a body and can no generate this time base emerging behavior.
But it will also be suggested the same sampling rate problem that the moon earth simulation above has.
get what car tire are also a moon earth problem.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Omega limit

Postby Julio Jerez » Sun May 19, 2013 9:32 am

Now because of what I explain above, I made a vehicle that is still a multi body vehicle, and take care of these special cases by know the specialty citation.
for example for a car , we know that the final motion the car must be attaché to the vehicle frame, and we know what the final ordination and velocity should be
so what this does is that in each simulation step is use the tire as force generation device, but after each integration we know that there is a small amount of error.
it is this error that is truncated rather than being accumulated.
bi the tire is a legitimate body, is not a ray cast tire. this method can be use for simulation anything like vehicle that move a high speed and nee these low mass fast moving bodies to followed the vehicle body.

Please try the vehicle, you will see that it is no different, it will give you the same result without having to increase the FPS to reduce those sample error I mentioned.
I hope this was clear because then I do not know how else to explain it.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Omega limit

Postby collerblade » Sun May 19, 2013 10:39 am

Story:
Ok. I never tried original (1.X) newton, only 2XX. In jointlibrary.dll there was 2 kind of car. Tried both, but multibodycar worked better for me. There was only 1 problem: it was slow and i could not figure it why is that happening. So recently i decided that i try to do it myself, but i run into this rotation issue.
Thats the storry. I dont want to spread false information.

About signal processing:
really. I never realized this "moon example". In my own simulateion "system" i used only velocities and instant impules for collision response. But if Newton is better (more exact), am happy about it :D. Ty for explonations.

About stars and galaxies:
Small correction: we use newton equations for calculation moving stars, but u sure know that for high speed is not enough, couz of time destorsion. Also there is the question of dark matter, what incresses the matter in the galaxies so the objects spinning faster then they should be.

Multibody car:
About 3.06 I tried the "simple car" demo. But it sez "Bodies: 2". Is a multibodycar or not? I wasnt looking the code yet :(.

Thank you
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: Omega limit

Postby Julio Jerez » Sun May 19, 2013 11:15 am

collerblade wrote:Story:
About signal processing:
really. I never realized this "moon example". In my own simulateion "system" i used only velocities and instant impules for collision response. But if Newton is better (more exact), am happy about it :D. Ty for explonations.

if you did a simulation of two celestial body going around each other, and one of as a mass about 5 to the time the mat of the other, you will get the smaller one going around a reasonable stable elliptical orbit around the large one
in that case you can calculate the period of that orbit. if after the system going into a steady state, you change the simulation rate to be larger or equal to the orbit period you will see what I mean.
This is Shannom theorem at work. it tell you what is the simply rate the will make the simulation so unstable that can no longer be a periodic motion. This is a fundamental principle of discrete signals, and there is not way around it.
In some special case when you have some extra information about how the motion of the object should be, it is possible to do so correction which is what I do wit the tire in the vehicle Joint.

collerblade wrote:About stars and galaxies:
Small correction: we use newton equations for calculation moving stars, but u sure know that for high speed is not enough, couz of time destorsion. Also there is the question of dark matter, what incresses the matter in the galaxies so the objects spinning faster then they should be.

The explanation that bodies prefer to rotate around the principal axis of inertia, is a fundamental consequence of the principle of conservation of angular momentum
which as I explained before is nothing but the summation of a bunch of small lineal momentum of the individual component of a system when they move along an elliptical path and the there sum is zero.
when the sum is not zero the they generate the processing torque that makes them wobble.
This will be true even when the discovered what dark matter and dark energy is. The principle is one of the few thing in physics that is even more solid than Special Relativity,
if by any chance some physics discover what Dark Matter really is and he find that it breaks the principle of conservation of angular momentum.
That will be a clue that that physics is a crackpot that does not know what he or she is doing, and should be ignored.

collerblade wrote:Multibody car: About 3.06 I tried the "simple car" demo. But it sez "Bodies: 2". Is a multibodycar or not? I wasnt looking the code yet

The car is seeing as a single body for the physics solver, but the joint have all the wheel as individual bodies that are use to calculate the force that a wheel apply to the main body,
this act as external forces and torque added to the chassis. the each wheel in integrate locally knowing that the any torque the tend to deviate the tire off the known trajectory is a computational error and can be ignores because it is small.
it is the accumulation of these forces that make it impossible to simulate the vehicle by the general solver, because the general solve can no be made aware of these special cases.

There is a method the can generalize these method of calculation forces in local space only, it is call Featherstone, basically it calculate the net acting force in local space, rather that reaction force between connected bodies
but it does not scale to general use. and this is because it only work for hierarchical configuration of articulated bodies, therefore can not deal with loops.
I try that and believe it is not as pewerful as people think it is. It solve one problem but it does it at the expense of bring much bigger ones.

Try the car joint and see the code you will see that is a 100% multi body car. I am still working on it, if you want we can work together to bring it to a more finish state.
Truth me this joint has being used in commercial games.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron