POV-Ray : Newsgroups : povray.advanced-users : isosurface surface normals : Re: isosurface surface normals Server Time
20 May 2024 09:58:06 EDT (-0400)
  Re: isosurface surface normals  
From: Tor Olav Kristensen
Date: 25 Dec 2001 19:20:06
Message: <3C2917F7.47C3D08C@hotmail.com>
Barron Gillon wrote:
> 
> Does anyone know (preferably have a macro they could send me) how to find
> the surface normal of an isosurface at an arbitrary <x,y,z>?  If I remember
> correctly, a macro that returns <g'(x),h'(y),i'(z)> where f(x,y,z) =
> <g(x),h(y),i(z)> and x, y, and z are specified will suffice.  The catch is
> of course that f() would be an arbitrary function, and I don't know how to
> find numeric derivatives.  Did I miss something in the standard includes
> that would do this?  Has anyone else done this?  Rune?  Thanks
>...

Warp has shown in another post how to find the gradient
of a function f(x, y, z) for any point in 3D space by
analytical calculation of the 3 partial derivatives of
the function.

But if you want to have POV to estimate this gradient
by applying some numerical methods, (in order to find
the partial derivatives), then you may have a look at
the code I provided in my answer to Jan Walzer's thread
12. Nov. 2001:

"Help on isosurface - distances - other stuff..."

news://news.povray.org/3BF0541A.62BC8C1F%40hotmail.com
http://news.povray.org/povray.advanced-users/19992/


Tor Olav


Post a reply to this message

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