POV-Ray : Newsgroups : povray.binaries.animations : Re: Elastic pendulum thingy [~1000KB] : Re: Elastic pendulum thingy [~1000KB] Server Time
19 Jul 2024 00:53:02 EDT (-0400)
  Re: Elastic pendulum thingy [~1000KB]  
From: Andrew Coppin
Date: 27 Oct 2003 15:52:36
Message: <3f9d8594$1@news.povray.org>
> -[I still can't quite get this to look how I wanted it to look]-
> How do you want it to look? At the moment it looks to me quite like what
it
> is a simulation of - that is a lot of masses connected by bungee cords.

Yeah, I'm not saying it looks unrealistic (although it seems to be in
slow-motion, which is odd; it isn't supposed to be!) It just doesn't look
how I imagined it looking... lol (I'm sure many POVers know *that* feeling
;-)

> I'm
> not sure quite how to make it look more like a single rope - possibly you
> need a force which tries to straighten the links out - this probably ought
> to be quite weak but highly damped.

I am starting to thing that the only actual problem is that I've got the
parameters set wrong... In particular, I'm not sure the masses match the
sizes of the objects or the forces between them... I'm thinking I'm gonna
try again, using real-world units this time! Say, you don't happen to have
the formula for the volume of a sphere do you? (Oh, and the approximate
density of iron...)

> Making the masses on the rope very much smaller might also help. This
would
> make the system more difficult to simulate though (smaller timesteps
> required).

Mmm... I would have imagines larger masses would be more difficult - more
acceleration and all that... but on the other hand, more subtle movements
would presumably involve lots of small but sudden changes in the forces
acting on the objects...

> -[So what do ya think, folks?]-
> Pretty impressive. Have you simulated any further in time in the
simulation
> that you've posted. It _looks_ as though it might explode to infinity at
> some point - or at least it looks on the verge of being unstable. I may be
> being overcritical of your algorithms though - you may have got it exactly
> right with very little damping.

I think I might definitely run it a bit longer... Just where the simulation
finishes, you can just about see a shock wave propogating up the chain -
just like the real thing! It's really interesting to watch that thing go...

> One way of checking this (which is used in scientific simulations to make
> sure that the errors in the simulation are small) is to find an expression
> for the total energy of the system, and to see if that is absolutely
> constant, or whether it is increasing or decreasing.

Presumably for a damped simulation it should be decreasing. And presumably
in the real world, it's theoritically constant - with "damping" really
involving energy of some kind being imparted to the air, etc. (possibly as
heat, not just motion).

> Just to insult your
> knowledge of physics, you do this by adding up the potential and kinetic
> energy, which are given by
>


OK... I'm not even gonna ask why!

> m*g*h = the gravitational potential energy for each mass (m=mass,
> g=acceleration due to gravity, h=hight above some arbitrary point)
>

'normal'
> length, where k is such that the force exerted by the spring is k*x and l
is
> the normal length of the spring. Note that since your springs never exert
a
> force outwards (if they're the same as your grid springs), this equation
> only applies to your springs when x is positive (stretched spring)

Yes, it's the same spring algorithm. I was originally going to have force in
both directions, but I decided the math was too complicated.

> If you have some damping, the energy should be decreasing. If you have no
> damping, the energy should be absolutely constant. If the energy increases
> continuously (even slightly), it means the the simulation is unstable -
try
> adding damping or shortening the step length.

Makes sense...

Presumably with all these calculations, there's a tendancy for energy to be
lost or gained through rounding errors... but then, the errors are as likely
to loose energy as the gain it, so over all there shouldn't be any big
change...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.