|
![](/i/fill.gif) |
POV-Ray 3.6.1a.icl8
It seems to me that in an isosurface, one can substitute sin(f_th(x,y,z))
for x and cos(f_th(x,y,z)) for z, and that bears out in simple testing.
Next I try to construct a cylinder via (x*x + z*z - 1), which works like a
champ. Then when I substitute the sin/cos of f_th() for x and z, it goes
all hooey and I get a solid box with a bunch of speckles, regardless (it
seems) of max_gradient settings.
Anyone have any idea why?
Scene files follows, render at the resolution of your preference:
-----------------------------------------
#include "colors.inc"
#include "functions.inc"
camera {
location <2.0, 10.5, -10.0>
look_at <6.0, 0.0, 0.0>
}
light_source { <-30, 30, -30> color rgb 1 }
plane { y, 0
pigment { color rgb <0.7,0.5,0.3> }
}
#declare XTest= function{x}
#declare SinTest= function{ sin(f_th(x,y,z))}
#declare ZTest= function {z}
#declare CosTest= function{ cos(f_th(x,y,z))}
#declare XZTest= function{pow(XTest(x,y,z),2) +
pow(ZTest(x,y,z),2) - 1}
#declare SinCosTest= function{ pow(SinTest(x,y,z),2) +
pow(CosTest(x,y,z),2) - 1}
#declare Funcs = array[6] {function{XTest(x,y,z)},
function{SinTest(x,y,z)},
function{ZTest(x,y,z)},
function{CosTest(x,y,z)},
function{XZTest(x,y,z)},
function{SinCosTest(x,y,z)}}
#local i=0;
#while(i < 6)
isosurface{
function {Funcs[i](x,y,z)}
contained_by {box {-1, 1}}
open
evaluate 0.6, 33, .7
texture{pigment{color White}}
translate i*3*x
}
difference{ box{-1,1} box {<-2,.1,-2>,2}
texture{pigment{color Blue}}
translate i*3*x}
#local i=i+1;
#end
Post a reply to this message
|
![](/i/fill.gif) |