POV-Ray : Newsgroups : povray.general : Smooth isofurface twist : Re: Smooth isofurface twist Server Time
29 Jul 2024 16:27:11 EDT (-0400)
  Re: Smooth isofurface twist  
From: StephenS
Date: 7 Feb 2011 22:50:00
Message: <web.4d50bc41824d792b4d5ec6a70@news.povray.org>
....
> Oh wait... more turns then scale (stretch) seems to work.
....
Image with the updated isosurface in p.b.i

#local fn_A=function(x){abs(x)-1};
#local fn_B=function{abs(z)-.25};
#local fn_C=function{abs(y)-.25};
#local N=1.;
#local fn_Smooth=function(x){x*x*x*(10+x*(6*x-15))};
#local fn_twistY=function{z*sin(fn_Smooth(x)*2*pi*N) +
y*cos(fn_Smooth(x)*2*pi*N)};
#local fn_twistZ=function{z*cos(fn_Smooth(x)*2*pi*N) -
y*sin(fn_Smooth(x)*2*pi*N)};
#local
fn_twist_Box=function{max(fn_A(x-1),fn_B(x,fn_twistY(x,y,z),fn_twistZ(x,y,z)),fn_C(x,fn_twistY(x,y,z),fn_twistZ(x,y,z))
)};
isosurface {
   function {
      fn_twist_Box(x-.5,y,z)
   }
   contained_by {box{<.5,-.5,-.5>,<1.5,.5,.5>}}
   threshold 0
   accuracy 0.001
   max_gradient 10.58
   max_trace 9

translate <-.5,0,0>
scale <10,1,1>
rotate <0,0,0>
}


Post a reply to this message

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