|
|
Le 16-11-28 à 18:42, Mike Horvath a écrit :
> Clipka gave me these formulas to generate a cylindrical isosurface.
>
> #declare fL = function(x,y,z) {y*100}
> #declare fC = function(x,y,z) {sqrt(x*x+z*z)*128}
> #declare fH = function(x,y,z) {atan2d(x,z)}
>
> What would be a formula for a sphere? L should be latitude, H longitude,
> and C radius.
>
> Thanks.
When I want a isosurface sphere, I use the following:
#include "functions.inc"
Then, I use the f_sphere(x,y,z,radius) function that use an internal
function. Faster and simple.
If you want the function to use in an isosurface, it's
sqrt(pow(x,2)+pow(y,2)+pow(z,2))-Radius to be used with a threshold of zero.
Also, you can use sqrt(pow(x,2)+pow(y,2)+pow(z,2)) and use the threshold
to controll the radius.
Using 3 functions is if you want to make a parametric sphere. It's not
the same thing.
Alain
Post a reply to this message
|
|