POV-Ray : Newsgroups : povray.advanced-users : Spherical isosurface : Re: Spherical isosurface Server Time
2 May 2024 19:36:49 EDT (-0400)
  Re: Spherical isosurface  
From: Alain
Date: 1 Dec 2016 18:40:40
Message: <5840b4f8$1@news.povray.org>
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

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