POV-Ray : Newsgroups : povray.general : Twist an isosurface : Re: Twist an isosurface Server Time
31 Jul 2024 16:25:17 EDT (-0400)
  Re: Twist an isosurface  
From: dave vanhorn
Date: 19 Dec 2006 20:22:09
Message: <45889041$1@news.povray.org>
#ifndef (SolidHeart)
    #ifndef (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; //Not sure where to set this yet, try 1.0
      #declare f = function {K*y}
      #declare Twist_x = function(x,y,z,f) //<-- Errors here with "expected 
parameter identifier, function identifier found instead"
                         {x * cos (f (y)) + z * sin (f (y))}

      #declare Twist_z = function(x,y,z,f)
                         {(-x * sin (f (y)) + z * cos (f (y))}

      #declare Heart_Function = function { f_torus (y-pow(abs(x * cos (f 
(y)) + z * sin (f (y))),Sharpness)*Bend,
                                                   (-x * sin (f (y)) + z * 
cos (f (y))*1),
                                                   (x * cos (f (y)) + z * 
sin (f (y))),
                                                   0.8,0.1) }
    #end
  #else
    #declare Heart_Function = function { f_sphere 
(y-pow(abs(x),Sharpness)*Bend, z*2, x, 0.6    ) }
  #end


Post a reply to this message

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