POV-Ray : Newsgroups : povray.unofficial.patches : alternate coordinate systems in iso.s. : Re: alternate coordinate systems in iso.s. Server Time
2 Sep 2024 18:21:00 EDT (-0400)
  Re: alternate coordinate systems in iso.s.  
From: Philippe Debar
Date: 21 Jan 2000 09:19:15
Message: <38886ae3@news.povray.org>
/*
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] hotmailcom )

*/

// 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

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