POV-Ray : Newsgroups : povray.advanced-users : Flying and bouncing debris Server Time
29 Jul 2024 10:28:57 EDT (-0400)
  Flying and bouncing debris (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Rohan Bernett
Subject: Flying and bouncing debris
Date: 28 Aug 2002 21:20:04
Message: <web.3d6d75fe669b420f18ccf4f70@news.povray.org>
This question is related to an earlier post of mine (the meteorite impact).
How would I make debris that flies away from an explosion into the air, and
falls back down and bounces along the ground a few times before coming to a
stop?

I want to use this with a meteorite impact animation, so that when the
meteorite hits the ground and forms the crater, it sends rocks and dust
flying everywhere.

Can anyone help?

Rohan _e_ii


Post a reply to this message

From: Ken
Subject: Re: Flying and bouncing debris
Date: 28 Aug 2002 21:35:59
Message: <3D6D7B3D.92EFB361@pacbell.net>
Rohan Bernett wrote:
> 
> This question is related to an earlier post of mine (the meteorite impact).
> How would I make debris that flies away from an explosion into the air, and
> falls back down and bounces along the ground a few times before coming to a
> stop?
> 
> I want to use this with a meteorite impact animation, so that when the
> meteorite hits the ground and forms the crater, it sends rocks and dust
> flying everywhere.

What you are describing is a classic particle generator system, the physics
and mathematics of which are beyond my simple abilities. You might be able
to combine Chris Colefax's liquid spray include file and his object exploder
include file tied in with his clockmod animation include file to achieve such
an effect. No gaurantees from me whether this suggestion has any real merit.

See - http://www.geocities.com/SiliconValley/Lakes/1434/#IncludeFiles

Other people in these groups have been working on particle systems but
I don't recall anyone releasing them for public use and remain in private
hands.

-- 
Ken Tyler


Post a reply to this message

From: J  Diehl
Subject: Re: Flying and bouncing debris
Date: 30 Aug 2002 03:25:03
Message: <web.3d6f1d5fd26a61b2f70c33440@news.povray.org>
Try to model a bouncing ball on a plane with varibales for different maximum
height and horizontal speed (the function will always be a parable).
Then use multiple balls starting from origin in different directions with
random size, maximum height and horizontal speed, while the combination of
height and speed should depend on the mass (size) of each.
Last, replace the balls by rotating pieces of debris and you should get a
nice impact.
There is no collision detection between the pieces themselves or any
heightfield on the ground.
A simple idea how to form a crater in the ground with heightfields see your
"meteorite impact" post.

These are very simple and just 'look alike' simulations of an impact. For a
realistic simulation you will have to study dynamics. Have a look at

(Jul 15th 2002) and at his animations at
http://www-public.tu-bs.de:8080/~y0013390/pov/sim/index.html
Watch his water interaction - it reminds me of an impact...


Post a reply to this message

From: Christopher James Huff
Subject: Re: Flying and bouncing debris
Date: 4 Sep 2002 20:12:23
Message: <chrishuff-6C2962.20114404092002@netplex.aussie.org>
In article <3D6D7B3D.92EFB361@pacbell.net>, Ken <tyl### [at] pacbellnet> 
wrote:

> Other people in these groups have been working on particle systems but
> I don't recall anyone releasing them for public use and remain in private
> hands.

I released a particle system patch. There was another particle patch of 
some sort, but I don't know if it was just a particle object or an 
actual particle system, or what kind of capabilities it had (even though 
I included it in MegaPOV+ alongside my own patch). These are pretty out 
of date though.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Rohan Bernett
Subject: Re: Flying and bouncing debris
Date: 15 Sep 2002 20:30:06
Message: <web.3d852586d26a61b2d02c7b870@news.povray.org>
J. Diehl wrote:
>Try to model a bouncing ball on a plane with varibales for different maximum
>height and horizontal speed (the function will always be a parable).
>Then use multiple balls starting from origin in different directions with
>random size, maximum height and horizontal speed, while the combination of
>height and speed should depend on the mass (size) of each.
>Last, replace the balls by rotating pieces of debris and you should get a
>nice impact.

So how would I create a means for simulating the neccessary system? What I
think I'd need would be a way to specify an initial position and velocity
and a force of gravity. Then a way of specifying how much the object
bounces when it hits the ground, and how many bounces it takes before it
stops. A rock from a meteorite impact, for example, would go up with a very
large velocity, but bounce to only, say, 1 metre on the first bounce, then
a couple of centimetres on the second, then stop.

If anyone can tell me of any way to do this, I'd be very grateful.

Rohan _e_ii


Post a reply to this message

From: Christopher James Huff
Subject: Re: Flying and bouncing debris
Date: 15 Sep 2002 21:01:24
Message: <chrishuff-C2F8F7.21000515092002@netplex.aussie.org>
In article <web.3d852586d26a61b2d02c7b870@news.povray.org>,
 "Rohan Bernett" <rox### [at] yahoocom> wrote:

> So how would I create a means for simulating the neccessary system? What I
> think I'd need would be a way to specify an initial position and velocity
> and a force of gravity. Then a way of specifying how much the object
> bounces when it hits the ground, and how many bounces it takes before it
> stops. A rock from a meteorite impact, for example, would go up with a very
> large velocity, but bounce to only, say, 1 metre on the first bounce, then
> a couple of centimetres on the second, then stop.

Try just using a scale factor for the percentage of kinetic energy the 
ball keeps after bouncing. A superball (high-bounce synthetic rubber 
ball) would be around 0.9, a rock more like 0.05. Take both the object 
and the surface it hits into account (maybe the average of both 
"elasticity" values). If you want a "stop" point, consider it stopped 
when the speed (length of the velocity vector) drops below a certain 
threshold.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Rohan Bernett
Subject: Re: Flying and bouncing debris
Date: 19 Sep 2002 01:00:05
Message: <web.3d895918d26a61b218ccf4f70@news.povray.org>
Christopher James Huff wrote:

>Try just using a scale factor for the percentage of kinetic energy the
>ball keeps after bouncing. A superball (high-bounce synthetic rubber
>ball) would be around 0.9, a rock more like 0.05. Take both the object
>and the surface it hits into account (maybe the average of both
>"elasticity" values). If you want a "stop" point, consider it stopped
>when the speed (length of the velocity vector) drops below a certain
>threshold.

A code example would certainly help, and some info to go with it would help
even more. I haven't had any experience in physics simulations, yet. I have
made some simple animations of objects moving along splines, and a falling
sphere, though.

Rohan _e_ii


Post a reply to this message

From: Tim Nikias
Subject: Re: Flying and bouncing debris
Date: 19 Sep 2002 04:08:42
Message: <3d89860a$1@news.povray.org>
Here are some equations you'll gonna need:

Considering Direct_Speed is the direction
the particle is flying with the vectorlength
representing the velocity the particle has,
Gravity being the amount of Gravity (in
m/s this'd 9.81), the path is calculated
like this:

Actual_Position=Starting_Position+Direct_Speed*Time-y*.5*Gravity*pow(Time,2)
;

To calculate a rebounce-position, you calculate when the y-component
reaches 0 (the height where the plane'd be) like this:

Hit_Time=-(Direct_Speed.y/Gravity)-sqrt(
pow(Direct_Speed.y/Gravity,2)+((2*Starting_Position.y)/Gravity) );

To make it clear what I've done: I just resolved the topmost equation for
the y-component and T. Since the equation looks like this:

we can change this to

which is the same as

and then we can use

t = -(p/2) +- sqrt( pow((p/2),2) + q )

So, when we now the instant the object hits the floor again, we need only
the
speed, and direction of flight at that instant. Then we multiply that vector
with <1,-1,1> to rebounce from the floor and multiply with some float (.9)
to lose some kinetic energy.
What's the direction/speed-vector?

Actual_Direction_Speed = Direction_Speed + Time*Gravity*y;

So, after we've calculated the time of hit, we can also calculate the
location by just putting the time back into the first equation. Then
we've got all we need: A new initial starting location, a new
speed and direction... And we can continue with the loop.

To do this properly in POV-Ray, you should set a loop
which checks the next hit (time). If a POV-Ray-Variable,
which keeps track of time (like clock*20 for 20 seconds),
is larger than the hit-time you calculated, the hit occured, and
the loop is run again.

I'll implement the code and send another reply then,
but you should get working already...

Regards,
Tim



--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde
"Rohan Bernett" <rox### [at] yahoocom> schrieb im Newsbeitrag
news:web.3d895918d26a61b218ccf4f70@news.povray.org...
> Christopher James Huff wrote:
>
> >Try just using a scale factor for the percentage of kinetic energy the
> >ball keeps after bouncing. A superball (high-bounce synthetic rubber
> >ball) would be around 0.9, a rock more like 0.05. Take both the object
> >and the surface it hits into account (maybe the average of both
> >"elasticity" values). If you want a "stop" point, consider it stopped
> >when the speed (length of the velocity vector) drops below a certain
> >threshold.
>
> A code example would certainly help, and some info to go with it would
help
> even more. I haven't had any experience in physics simulations, yet. I
have
> made some simple animations of objects moving along splines, and a falling
> sphere, though.
>
> Rohan _e_ii
>


Post a reply to this message

From: Tim Nikias
Subject: Re: Flying and bouncing debris
Date: 19 Sep 2002 04:12:59
Message: <3d89870b$1@news.povray.org>
Oops, that should be

Actual_Direction_Speed = Direction_Speed - Time*Gravity*y;

not plus (+) Gravity.

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Tim Nikias
Subject: Re: Flying and bouncing debris
Date: 19 Sep 2002 05:17:26
Message: <3d899626@news.povray.org>
Hm. Somehow I can't get the code to work, though I implemented
just that in my particle system. I've got a headache (due to a
flu), so I'm not really up to it now. Still, the equations you need
are the same:

Position = Initial_Position+ Direct_Speed*Time - y*.5*Gravity*Time*Time;
Speed = Direct_Speed -y*Gravity*Time;

All you need to do is modify the equations in order to find the
exact time when the particle hits the ground again, then calculate
the speed and position of impact, multiply the new direction with
<1,-1,1> (to bounce from the y-plane) and a float < 1 for
dampening, and go on until you reach the present time. Shouldn't
be too difficult.

Regards,
Tim


--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde
"Tim Nikias" <tim### [at] gmxde> schrieb im Newsbeitrag
news:3d89870b$1@news.povray.org...
> Oops, that should be
>
> Actual_Direction_Speed = Direction_Speed - Time*Gravity*y;
>
> not plus (+) Gravity.
>
> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
> Email: Tim### [at] gmxde
>
>


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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