|
|
An isosurface function demonstration that mimics the onion pattern
in POV-Ray.
#declare T = pi;
#declare A = pi;
#declare X = A*sin(T)*(1-A*2)*(1/2);
#declare Y = 2*A*cos(T)*(1-A*2)*(1/2);
#declare Z = (-1+A)*(2+(A*2))*cos(T)*2;
#declare Onion_Cube =
function { cos(5*(sqr(sqr(x)+sqr(y)+sqr(z)))) -
sin(5*(sqr(sqr(X)+sqr(Y)+sqr(Z)))) }
// You can come close to the original with just this function -
// function { cos ( 5*( sqr ( sqr(x) + sqr(y) + sqr(z) ))) }
#declare Onion_Tex =
texture {
pigment { onion
color_map {
[.2 rgb<1,0,0>]
[.4 rgb<0,0,1>]
[.6 rgb<0,1,0>]
[.8 rgb<1,1,0>]
}
}
}
isosurface { function { Onion_Cube } threshold 0 accuracy 0.001
texture { Onion_Tex
finish { ambient .35 diffuse .5
}
}
rotate 45*y
rotate 45*-x
}
--
Wishing you Seasons Greetings, A Merry Christmas, and A Happy New Year !
Ken Tyler - 1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
|