|
![](/i/fill.gif) |
"dave vanhorn" <mic### [at] gmail com> wrote:
> >> Very frustrated.. :(
> >>
> > Why? Didn't the code you just posted work?
>
> Nope, it errors out, I'm not finding the error messages, or even where it's
> pointing to when it errors, to be all that helpful.
Hi,
Perhaps K3DSurf can help since it can generate formulas for twisted
isosurfaces from an original one. You can then "see" the result before
using the generated twisted iso in your code. Supported deformations are
twisting and scaling for isosurfaces and parametric surfaces.
Cheers,
Taha
Post a reply to this message
|
![](/i/fill.gif) |
|
![](/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) |