|
 |
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
|
 |
|
 |
Thank you for the link !
Denis.
Bob Hughes wrote:
[...]
> I'll let Greg answer too :-) but you obviously haven't heard about MegaPov,
> or it's 'hf_height_at' keyword which allows you to find any points y
> coordinate on the surface of a height field. HF is along x and z, not x and y
> as you had said and the y value is it's height. Check at:
> http://www.nathan.kopp.com/patched.htm
>
> Bob
Post a reply to this message
|
 |