|
![](/i/fill.gif) |
/*
I made a uv mapped sphere with a function as its pigment and another one
as its normal. Actually, there are two functions combined into one for
the pigment. It's on my web site. There's a link to the picture on the
povray page. It makes a nice wallpaper. The sin(100*y) is commented
out because it's doesn't affect anything. If only one function is used
for the pigment, it would give a checkered appearance. The checkered
patterns for the positive and negative versions get combined by squaring
the function and then using a negative sign.
*/
//Brendan Ryan
#declare sub_pattern =
function { sin(30*x) * /*sin(100*y) **/ sin(30*z) }
#declare pigpattern =
function { -pow(sub_pattern(x,y,z),2) }
#declare norpattern =
function { sin(40*x*y) }
sphere { <0,0,0>, 1
uv_mapping
pigment { function { pigpattern(x,y,z) } rotate 90*x }
pigment { color rgb <0,0,1> }
normal { function { norpattern(x,y,z) } }
}
//Brendan Ryan
Post a reply to this message
|
![](/i/fill.gif) |