|
 |
I was trying to figure out how to warp a cylinder into a sphere sweep
helix, but it didn't work. It squished the thing for some reason. My
thought was to turn the x dimension of the cylinder into the radius, and
the y dimension into the angle, but everything needs to be done
backwards. I was trying to use a rectangular to polar conversion
formula, because of things needing to be backwards.
I would appreciate it if someone could tell how to do it right. I would
also like to know how to do the same thing using parametic surfaces, and
what it was that I was doing wrong.
I think this is the code I was using.
#include "colors.inc"
#include "finish.inc"
light_source {<3,4,-5>*100 rgb 2}
camera {location <12,0,-14> look_at 0 }
#version unofficial MegaPov 0.7;
#declare Cyl= function{((x-3)^2+y^2)^.5 -1}
//plane{y,-2 pigment{White}}
#declare Cyl2 = function {Cyl(x,z*cos(pi/3) - y*sin(pi/3),
y*cos(pi/3) + z*sin(pi/3))}
#declare Cir = function{(x*cos(y)+x*sin(y))}
#declare Cir2 = function{Cyl2(sqr(x^2+y^2),atan2(x,y),z)}
isosurface{
function {Cir2(x,y,z)}
contained_by{box{-2*pi,2*pi}}
method 2
eval
pigment{Green}
finish{Shiny}
}
--
Dan Johnson
http://www.geocities.com/zapob
Post a reply to this message
Attachments:
Download 'isofailure.jpg' (15 KB)
Preview of image 'isofailure.jpg'

|
 |