|
![](/i/fill.gif) |
I have tweaked a bit some parts, but this works as it should:
#declare Bend=0.5;
#declare Sharpness=0.8;
#declare SolidHeart = 0;
#declare TwistHeart = 1;
#if (!SolidHeart)
#if (!TwistHeart)
// Original untwisted version
#declare Heart_Function =
function { f_torus (y-pow(abs(x),Sharpness)*Bend, z*1, x, 0.8,0.1) }
#else
//Twisted version
#declare K = 1; //twist angle
#declare f = function (y){K*y}
#declare Twist_x = function (x,y,z){( x*cos(f(y)) + z*sin(f(y)))}
#declare Twist_z = function (x,y,z){(-x*sin(f(y)) + z*cos(f(y)))}
#declare Heart_Function =
function { f_torus (y-pow(abs(Twist_x(x,y,z)),Sharpness)*Bend,
Twist_z(x,y,z)*1,Twist_x(x,y,z), 0.8,0.1) }
#end
#else
#declare Heart_Function = function { f_sphere
(y-pow(abs(x),Sharpness)*Bend, z*2, x, 0.6 ) }
#end
Thomas
Post a reply to this message
|
![](/i/fill.gif) |