POV-Ray : Newsgroups : povray.advanced-users : isosurface help : Re: isosurface help Server Time
30 Jul 2024 00:21:04 EDT (-0400)
  Re: isosurface help  
From: Chris Huff
Date: 1 Sep 2000 12:07:53
Message: <chrishuff-BA9338.11092901092000@news.povray.org>
In article <39AFCCBA.F91D7D07@psu.edu>, Paul Jones <pdj### [at] psuedu> 
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] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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