|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |