|
![](/i/fill.gif) |
In article <39AFCCBA.F91D7D07@psu.edu>, Paul Jones <pdj### [at] psu edu>
wrote:
> is it possile to make an isosurface from a function F(r,theta,phi) in
> spherical coordinates? or do I have to convert to cartesian or create a
> set of parametric equations.....
Just use functions to convert the cartesian coordinates to spherical
coordinates. There are many examples of these functions out there, just
guessing I would write:
#declare R = function {sqrt(sqr(x) + sqr(y) + sqr(z))}
#declare Phi = function {atan2(x, z)}
#declare Theta = function {atan2(y, sqrt(sqr(x) + sqr(z)))}
I might have Phi an Theta backwards or going the wrong direction(or
completely wrong, since I am going from memory), but this gives the
general idea. Just feed these functions the xyz cartesian coordinates
and use the result as the spherical coordinates.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
![](/i/fill.gif) |