POV-Ray : Newsgroups : povray.general : Isosurface Online Tutorial - I have a website now : Re: Isosurface question Server Time
11 Aug 2024 13:17:05 EDT (-0400)
  Re: Isosurface question  
From: Chris Huff
Date: 24 Aug 1999 05:49:56
Message: <37C26AF7.52C10437@compuserve.com>
You can use the built in function for a torus like this:
function{"torus", <R0,R1>} or you can use the actual equation like this:
function{sqrt(sqr(sqrt(sqr(x)+sqr(z))-R0)+sqr(y)) -R1 }.

And to scale the object, what you were doing is scaling the values the
function returns, you need to scale the coordinate values. Like function
{(x/scaleVal)^2 + (z/scaleVal)^2 * y}
You can do it more easily like this:
#declare torusFunc = function{sqrt(sqr(sqrt(sqr(x)+sqr(z))-R0)+sqr(y))
-R1 }
isosurface {...
    function {torusFunc(x/scaleVal, y/scaleVal, z/scaleVal)}
    ...
}


Post a reply to this message

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