POV-Ray : Newsgroups : povray.general : revolving isosurfaces : Re: revolving isosurfaces Server Time
19 Nov 2024 22:41:50 EST (-0500)
  Re: revolving isosurfaces  
From: Mike Williams
Date: 21 Dec 2001 13:10:27
Message: <c$8gACAZg0I8EwJO@econym.demon.co.uk>
It can be improved by adding some ripples to the surface, to look like
the effect of individual fibres. I've used "-sin(x*300)*0.001 -
cos(z*300)*0.001" (where x will later become the polar co-ordinate r).

I can stop the rope twisting the opposite way at the top and bottom, by
using "z*(1-2*(x>0))". That's my way of achieving z*sign(x).

The "y+0.127" factor nearly fixes the continuity at the top and bottom,
but not quite.


#include "functions.inc"

#declare F_Helix=
 function{f_helix1(x,y+0.127,z, 2, 20, 0.06, 0.04, 1, 1, 0)
 -sin(x*300)*0.001 -cos(z*300)*0.001
 }
 
#declare C1=<-1.2,-1.2,-0.15>;
#declare C2=< 1.2, 1.2, 0.15>;

isosurface {
 function {F_Helix(f_r(x,y,z)-1, f_ph(x,y,z), z*(1-2*(x>0)))}
 max_gradient 3
 contained_by {box {C1,C2}}
 pigment {rgb <1,.8,.5>}
 rotate y*45
}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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