|
![](/i/fill.gif) |
/*
Quick & dirty & UNTESTED cylindrical & polar coordinates function
copied from a math book,
blindly adapted for left-handed coordinate system
& thorougly UNTESTED (not even for parse errors)
(Philippe Debar phi### [at] hotmail com )
*/
// Cylindrical coordinates
#declare CylRadius=function{sqrt(x^2+z^2)}
// use y for height
// Polar coordinates
#declare PolarRadius=function{sqrt(x^2+y^2+z^2)}
#declare PolarHorizontalAngle=function{atan2(z,x)}
#declare PolarVerticalAngle=function{atan2(CylRadius(x,y,z),y)}
// I hope it'll work
Post a reply to this message
|
![](/i/fill.gif) |