POV-Ray : Newsgroups : povray.binaries.animations : Roll-athon (455 kbbu) : Re: Roll-athon (455 kbbu) Server Time
20 Jul 2024 23:24:06 EDT (-0400)
  Re: Roll-athon (455 kbbu)  
From: Denis Corbin
Date: 12 Jul 2000 18:00:41
Message: <396CBED9.17A6BCF7@wanadoo.fr>
Thank you for having open my mind to "MegaPov" !

Denis.

"Greg M. Johnson" wrote:
> 
> Denis Corbin wrote:
> 
> > Hi Greg,
> >
> > nice animation, but a lot of questions arise !
> >
> > But OK, I've selected only one question :
> >
> > In your animation, what is the link between the surface and the position
> > of the spheres ? Well in other words, how do you know the height (z) of
> > the surface at a given (x,y) point ?
> 
> You need x,y,z at any given point AND the normal of the surface.
> 
> Here's the algorithm in a nutshell. Yes, it requires the mega pov patch.  First I
> define my Surface as an isosurface (I never liked heightfields (;-p  ).
> 
> 1. Particles have a starting velocity in  x  & z. and a starting position in x & z.
> 
> 2. A trace function is called for the "new place".
>     #declare Downthere=trace(Surface,Oldplace+0.10*Oldvelocity+1000*y, -y, Norm);
> 
> 3. The velocity is modified by adding the x  and z components of the NORMAL of the
> surface at the new place.
>     #declare Newvelocity=Oldvelocity+<Norm.x,0,Norm.z>;
> 
> 4. The new place is modified by adding the NORMAL of the surface times the radius
> of the ball.
>     #declare Placetostore=Downthere+Norm*ballradius;
> 
> Then I store the Placetostore for each ball.


Post a reply to this message

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