POV-Ray : Newsgroups : povray.general : Some aid in physics required... : Re: Some aid in physics required... Server Time
3 Aug 2024 20:16:43 EDT (-0400)
  Re: Some aid in physics required...  
From: Rune
Date: 25 Feb 2004 05:59:40
Message: <403c801c$1@news.povray.org>
Tim Nikias v2.0 wrote:
> I'm placing them a small value (.00001) away from
> the surface

Yes, I know, but I knew you'd get the idea... ;)

> Ah, that's an idea I hadn't thought about... Let me see:
> I have a particle lying on the floor. Gravity gets added,
> one impact is calculated, it rebounces off the floor,
> probably staying a certain distance above the floor. It
> falls back down, maybe gets even more momentum due to
> the falling...

It will not get increasingly more momentum, but come to a rest at a
negligible amount, which will make it constantly hover above the surface
with a distance that equals the distance that gravity can move an
initially non-moving particle over one time-step (that is very little)
plus the distance you move the particle away from the surface with (e.g.
.00001).

That's how particles slide and come to a rest in my system, and it works
fine.

> Building the effects into the structure like checking
> if it's already on the floor and thus gravity need not
> be added would be counterproductive.

Yes, gravity should always be added.

> BTW, how did you handle this in your particle system? Like you
> described, one impact per timestep?

Mine works like I described: There can be more than one impact per
timestep but usually there is only one.

> Did you then use dampening etc?

No.

> I'm not sure how flexible your system is, e.g. User-
> Defined Macros for Wind/Gravity/Special Effects. IIRC
> one could supply starting positions and velocities,
> and things like gravity and wind are "hardwired" into
> the internal processes.

You can define the gravity force and direction for every point in space
for every moment in time. Needless to say, you can use it for effects
that look nothing like gravity at all. Likewise for wind.

> PS: Just had an idea: I could maybe just trace the
> surface normal and if it's close enough to the
> particle, energies added towards the normal get
> nullified when the velocity at the moment aren't high
> enough so that a rebounce might be feasible... That'd
> be a combination of your idea of using just the
> minimum timesteps but allowing several hits and my
> idea of having a simple check to avoid adding
> impossible energies... I'll have to look into that.

It still sounds like a hack... As I see it, a resting particle is simply
a sliding particle that don't happen to be moving.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com **updated Jan 29**
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

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