From: "Kevin Pegrume"
To: Martin Baker
Subject: fan of your web site
Date: 06 March 2002 20:02
Dear martin,
I have recently come across your MJB World web site and have read it at great interest. I am awe inspired by your knowledge of physics and 3D programming and your generosity in sharing your considerable efforts with others. (Much respect:)
My interests at the moment are 3D, physics in general and cosmology specifically.
I am looking for a programming language or 3D package to model the formation
and rotation of spiral galaxies and present the results on an
web page in real time if possible. One approach would be to mount a particle
emitter on a moving object to give it reference frame. This approach would be
generally useful for animation in general. For instance, 2 simple particle emitters
mounted on opposite sides of a rotating cube would give a simple simulation
of a garden sprinkler. If the cube was accelerating upwards this would simulate
gravity but the difficulty would be getting the observation frame to follow
the cube. Perhaps it would be easier to program gravity into the particles or
the environment as a whole. How close is your program to being able to do this?
Specifically can your emitters be mounted on moving/rotating objects?
I would very much like to see your finished or even part finished physics modelling software and it is something I would have liked to have done myself if I had the ability, and wish you good luck with your project. For what it is worth The following thought may offer a way forward in modelling perfectly elastic collisions.
This is conjecture but it is worth a try. Consider every collision (initially)
as a perfectly inelastic collision. Calculate the resultant velocity vector
from momentum conservation. Now use this vector to give a reference frame for
the rebound in the elastic case to give the resultant vectors in the temporary
reference frame and then translate back to the global reference frame. The amount
of time spent in the temporary reference frame obviously effects the outcome
and will be considerable in a very inelastic collision and negligible for a
perfectly elastic collision. The same approach could be used for angular momentum
considerations. Imagine a meteorite on a direct collision course with a large
spinning body. On impact it cannot instantly acquire the rotation velocity of
the body so it takes time to accelerate. An observer on the body would see the
meteorite spiralling in and to him it would look like the meteorite was being
decelerated to a stop as it gouged out an elongated crater. If the meteorite
and the large body were elastic the acceleration (or deceleration depending
on your point of view) of the meteorites lateral velocity will be dependant
on the length of time of the rebound i.e. the impulse would have to be calculated
and would be negligible for a very stiff elastic objects. A rubber ball is very
elastic but would receive a larger transverse impulse
due to the greater contact time as it deforms and expands again. I do not know
if this idea is of any use to you or maybe you have already considered it and
dismissed in the past?
As for the spinning pencil problem I look at it like this. Imagine a mass rotating around a fixed point attached by a thread. The thread can be viewed as continuously accelerating the mass towards the centre of rotation. When the thread snaps the acceleration stops and the mass instantly transfers from a rotating reference frame to moving in a straight line. You could however argue that it is impossible for the thread to snap instantly but that can be ignored to a first or even second approximation. When the pencil is rotated "artificially" so that the point and the rubber revolve in different planes a constant acceleration has to be applied to maintain those paths. When that acceleration stops as in the thread snapping in the above example the translation to a different frame is "instantaneous" and the two ends trying to continue in a straight line "instantly" revolve in the same plane.
It would be interesting to consider a long flexible pencil. If rotated fast enough in the artificial gimble the pencil will bend so that the two ends rotate in the same plane even while it is in the gimble. But now consider what happens when released. The pencil will try to straighten out and the resultant motion will be complex and that will take some modelling!
You might like to have a look at Illusion from Impulse. It is a particle simulator and can be downloaded for free and very quickly from http://www.coolfun.com . It is not real physics or even 3D but the results are spectacular and fun. The catch with the free version is that projects cannot be saved BUT you can save movies you have made in various formats.
You might also like to have a look at Truespace 3 SE from the Caligari Corporation
which is also free. This attempts to model physics and objects can be given
COGs and various motion vectors. The results are artistically
quite good but I think the physics is a bit suspect. If I give an object an
initial velocity in a straight line AND an acceleration vector at right angles
to its initial velocity vector it should travel in a circular path, shouldn't
it? Have I got the wrong end of the stick or has the program?
Hope to hear from you.
Kev.
From: "Martin Baker"
To: "Kevin Pegrume"
Subject: Re: fan of your web site
Date: 08 March 2002 11:12
Kevin,
> I have recently come across your MJB World web site and have read it at
> great interest. I am awe inspired by your knowledge of physics and 3D
> programming and your generosity in sharing your considerable efforts with
> others. (Much respect:)
Thanks, I try my best, although I think I may be spreading my efforts a bit
too thin, the quality of the site is a bit patchy, its such a big subject
and there is so much that I want to do. I could do with some help!
> My interests at the moment are 3D, physics in general and cosmology
> specifically. I am looking for a programming language or 3D package to
> model the formation and rotation of spiral galaxies and present the
> results on an web page in real time if possible. One approach would
> be to mount a particle emitter on a moving object to give it reference
> frame. This approach would be generally useful for animation in
> general. For instance, 2 simple particle emitters mounted on opposite
> sides of a rotating cube would give a simple simulation of a garden
> sprinkler. If the cube was accelerating upwards this would simulate
> gravity but the difficulty would be getting the observation frame to
> follow the cube. Perhaps it would be easier to program gravity
> into the particles or the environment as a whole. How close is
> your program to being able to do this? Specifically can your
> emitters be mounted on moving/rotating objects?
I think the program is getting to the stage where I can start incorporating
the physics into the program, but I am not quite there yet.
> I would very much like to see your finished or even part finished physics
> modelling software and it is something I would have liked to have done
> myself if I had the ability, and wish you good luck with your project.
For
> what it is worth The following thought may offer a way forward in
> modelling perfectly elastic collisions.
>
> This is conjecture but it is worth a try. Consider every collision
> (initially) as a perfectly inelastic collision. Calculate the resultant
> velocity vector from momentum conservation. Now use this vector to give
a
> reference frame for the rebound in the elastic case to give the resultant
> vectors in the temporary reference frame and then translate back to the
> global reference frame. The amount of time spent in the temporary
> reference frame obviously effects the outcome and will be considerable
> in a very inelastic collision and negligible for a perfectly elastic
> collision. The same approach could be used for angular momentum
> considerations. Imagine a meteorite on a direct collision course with
> a large spinning body. On impact
> it cannot instantly acquire the rotation velocity of the body so it takes
> time to accelerate. An observer on the body would see the meteorite
> spiralling in and to him it would look like the meteorite was being
> decelerated to a stop as it gouged out an elongated crater. If the
> meteorite and the large body were elastic the acceleration (or
> deceleration depending on your point of view) of the meteorites
> lateral velocity will be dependant on the length of time of the
> rebound i.e. the impulse would have to be
> calculated and would be negligible for a very stiff elastic objects. A
> rubber ball is very elastic but would receive a larger transverse impulse
> due to the greater contact time as it deforms and expands again. I do not
> know if this idea is of any use to you or maybe you have already
> considered it and dismissed in the past?
I did think about working in the frame of reference of one of the colliding
objects, but as you say, the other object then appears to be travelling in a
spiral. So can we apply Newtons laws in this case? i.e. the other object,
with no external forces on it, does not appear to be travelling in a
straight line. Its almost as if the 'relativity' of Newtons laws does not
apply if we combine linear and angular motion? I think you may be suggesting
something slightly different, i.e. to apply this change of reference for a
short time during the collision? Do you think that this could be used to
solve the general case of a collision between two rotating objects? Do you
have any ideas about how to derive equations for this?
> As for the spinning pencil problem I look at it like this. Imagine a mass
> rotating around a fixed point attached by a thread. The thread can be
> viewed as continuously accelerating the mass towards the centre of
> rotation. When the thread snaps the acceleration stops and the mass
> instantly transfers from a rotating reference frame to moving in a
> straight line. You could however argue that it is impossible for the
> thread to snap instantly but that can be ignored to a first or even
> second approximation. When the pencil
> is rotated "artificially" so that the point and the rubber revolve
in
> different planes a constant acceleration has to be applied to maintain
> those paths. When that acceleration stops as in the thread snapping
> in the above example the translation to a different frame is
> "instantaneous" and the two ends trying to continue in a straight
> line "instantly" revolve in the same plane.
>
> It would be interesting to consider a long flexible pencil. If rotated
> fast enough in the artificial gimble the pencil will bend so that the
> two ends rotate in the same plane even while it is in the gimble.
> But now consider what happens when released. The pencil will
> try to straighten out and the resultant motion will be complex
> and that will take some modelling!
I think what confused me initially about this problem, is that I did not
realise that linier movement of objects contributes to the angular momentum
of the total system. So there are not any contradictions if we stay in
stationary reference plane. But again a rotating reference plane does not
seem to work, because when the thread breaks the object appears to spiral
away?
> You might like to have a look at Illusion from Impulse. It is a particle
> simulator and can be downloaded for free and very quickly from
> http://www.coolfun.com . It is not real physics or even 3D but the results
> are spectacular and fun. The catch with the free version is that projects
> cannot be saved BUT you can save movies you have made in various formats.
>
> You might also like to have a look at Truespace 3 SE from the Caligari
> Corporation which is also free. This attempts to model physics and objects
> can be given COGs and various motion vectors. The results are artistically
> quite good but I think the physics is a bit suspect. If I give an object
> an initial velocity in a straight line AND an acceleration vector at right
> angles to its initial velocity vector it should travel in a circular path,
> shouldn't it? Have I got the wrong end of the stick or has the program?
Yes, I would really like to build an open source program, which does what
these programs do.
Thanks,
Martin
From: "Kevin Pegrume"
To: "Martin Baker"
Subject: Re: fan of your web site
Date: 10 March 2002 09:04
Dear Martin,
From: "Kevin Pegrume"
To: "Martin Baker"
Subject: Re: fan of your web site
Date: 19 March 2002 13:38
From: "Martin Baker"
To: "Kevin Pegrume"
Sent: Wednesday, March 20, 2002 1:30 PM
Subject: Re: fan of your web site
Hi Kev,
This is really good, and the animated gif is fantastic, how did you create
it? did you use flash or something like that?
I have been trying to calculate the impulse, see here:
https://www.euclideanspace.com/physics/dynamics/tableTopPhysics/goal.htm
I can calculate the total impulse, but I cant work out how much of this
impulse is due to linier and how much due to angular momentum.
I would be interested on any thoughts you might have on this.
Thanks again,
Martin
From: "Kevin Pegrume"
To: "Martin Baker"
Subject: Re: fan of your web site
Date: 22 March 2002 12:15
Hi Martin,
I used "Geometers Sketchpad" which has a very basic animation feature
and a
useful trace function (the red and green lines). The program is quite useful
to trying out ideas in 2D geometry. The results were recorded using a
"screen grabber" and edited in Animation Shop to remove excess frames
and
keep the file size small. Quite a long winded process in all. I will have to
find out what is possible with Flash. Maybe one day I will write a 2D
physics simulator and animator which may be useful for education purposes.
In the meantime I will have a go at solving the linear and angular momentum
problem as time allows.
Kev.
From: "Kevin Pegrume"
To: "Martin Baker"
Subject: Re: fan of your web site
Date: 24 March 2002 20:12
Hi martin,
In the goal example energy and momentum are conserved but I do see the difficulty you point out about where the impulse for the change in angular momentum comes from. While thinking of a possible solution I have come across a bit of a conundrum that maybe you could shed some light on.
Imagine a 5kg mass with a instantaneous linear velocity of 10 m/s but tethered
by a lightweight line of say 100m. Its moment of Inertia(I) = m*r**2 = 50000
and its angular velocity (W) = 2*Pi v/(2*Pi*r) = v/r = 0.1 radians.
The angular kinetic energy is given by 1/2*(I*W**2) = 1/2*(50000*0.1*0.1) =
250
The kinetic energy can also be obtained from the linear definition:
Ke =1/2*(m*v**2) = 1/2*5*10*10 = 250
The two are the same
1/2*(I*W**2) = 1/2(m*r**2*W**2) = 1/2(m*r**2*v**2/r**2) = 1/2*(m*v**2)
Linear and angular kinetic energy are equivalent. The same can not be said for momentum:
angular momentum = I*W = m*r**2*v/r = m*v*r = 5*10*100 = 5000
linear momentum = m*v = 5*10 = 50
It the tether of the mass snapped and the free mass collided with a similar mass going in the opposite direction but at the same speed they would have the momentum and recoil equally after the collision. If on the other hand the collision occurred while the original mass was still tethered, would the original mass have one hundred times the momentum of the untethered mass? If the untethered mass had a mass of 500 kg would it recoil from the tethered 5 Kg mass at 10 m/s ? It is very confusing. How do we relate angular momentum to linear momentum?
Kev.
Hi Kev,
As I understand it, angular momentum and linear momentum are independent of each other, not only are the values different, but also different units (linear is in Kg m/s but angular is in Kg.m^2/s). So I think angular momentum cannot be converted to linear momentum and visa versa, but in a closed system linear momentum is conserved, and the total angular momentum of the system is independently conserved.
So when the tether snaps the linear momentum is conserved because whatever is at the other end of the tether flies off in the opposite direction.
The angular momentum is conserved because, even after the tether snaps, and it is traveling in a straight line, it still has an apparent rotation about the original centre of rotation.
What I am trying to do is to take the goal example because it is simple enough to solve by working out the interaction of each particle. But then I would like to solve the problem again using just the quantities like angular momentum and linear momentum so that I can generalise this to more complex collisions, but even in this case I can't solve it in these terms. I think it might be that I am calculating the angular momentum about CG, whereas what is conserved, is the angular momentum about a fixed point? perhaps that is I should be measuring? Although, however you measure it, in the goal example, the angular momentum is being reversed. The angular momentum change must come from a torque, which requires two forces, the impulse from the collision and the inertia of the object.
I still cant solve the example in these terms, which I could then apply to more general collisions.
Martin
metadata block 

see also: 
Next: Linear motion

Correspondence about this page  
Book Shop  Further reading. Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them. 
Physics for Game Developers  Assumes a knowledge of vectors, Matrix and trigonometry (the book has a one page introduction to quatnions). The book introduces Newtons laws but it does assume a basic knowledge physics. It covers Kinematics, Force, Kinetics, Collision (detection), Projectiles, Aircraft, Ships, Hovercraft, Cars, Realtime, 2D rigid body, Collision Response, Rigid body rotation, 3D rigid body, multiple bodies in 3D and particles. (I cant find a general formula for collision response which combines linear and rotation, but there may be something in the code included?). If you don't have the prerequisite knowledge of Matrices etc. you may want to get the Mathematics for 3D Game programming book first. 
Commercial Software Shop Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them. 

This site may have errors. Don't use for critical systems.
Copyright (c) 19982023 Martin John Baker  All rights reserved  privacy policy.