POV-Ray : Newsgroups : povray.general : Twist an isosurface Server Time
31 Jul 2024 20:22:53 EDT (-0400)
  Twist an isosurface (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: virtualmeet
Subject: Re: Twist an isosurface
Date: 21 Dec 2006 22:35:00
Message: <web.458b51f9f74d0655f605ab610@news.povray.org>
"dave vanhorn" <mic### [at] gmailcom> 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

From: Thomas de Groot
Subject: Re: Twist an isosurface
Date: 22 Dec 2006 03:35:31
Message: <458b98d3@news.povray.org>
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

From: dave vanhorn
Subject: Re: Twist an isosurface
Date: 22 Dec 2006 15:12:50
Message: <458c3c42$1@news.povray.org>
"Thomas de Groot" <t.d### [at] internlDOTnet> wrote in message 
news:458b98d3@news.povray.org...
>I have tweaked a bit some parts, but this works as it should:

I see!  Thanks so much.  I was fumbling in the dark there.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.