|
|
Among other things, Greg M. Johnson wrote:
> This conservation of energy idea is cool. Someone suggested it back when
> I was trying to model the solar system back in 2002, but I think I got it
> now.
>
>
> OLD SYSTEM:
> particle at p with velocity v
> p=p+v/constant
> a=sum of forces based on new surroundings
> v=v+a/constant
>
> repeat for every frame of animation, giving extreme energy losses.
>
> NEW PROPOSED SYSTEM:
> particle at p with velocity v and kinetic energy K
> p=p+v/constant
> calculate work done by moving along/against all forces in x,y, and z.
> this gives a delta to old kinetic energy K.
>
> okay now I'm lost
Are you looking for a way of simulating a system of "particles", subject to
interactions between them, in a physically meaningful way? You should have
a look at some "molecular dynamics" algorithms. Moldy
(http://chin.icm.ac.cn/~xxia/webchin/software/moldy.html) is a nice free
program, which features an interesting manual. Basically, you know the
positions, velocities and forces on all the particles at a given time, and
calculate them for a later moment, and repeat. To obtain the new positions
(and velocities), algorithms like Verlet and "leapfrog" are popular.
--
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby
Post a reply to this message
|
|