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:26 EDT (-0400)
  Re: alternate coordinate systems in iso.s.  
From: david sharp
Date: 20 Jan 2000 10:23:25
Message: <3887286d@news.povray.org>
SamuelT. <STB### [at] aolcom> wrote in message
news:38868E41.19938684@aol.com...
> Do you mean like being able to rotate functions? Such as: (x^8+y^8+z^8
> rotate y*45)
>

Being able to do general coordinate transformations would be a
very nice feature, but I think would require function{} accepting
vector-valued functions as additional parameters ( and the
attendant applying of the transforms)

For simple things like rotation about y you can get by with stuff like:

#declare F=function(x^8+y^8+z^8}
#declare A=pi/4;
#declare FRotated=function{cos(A)*x+sin(A)*z,  y, -sin(A)*x+cos(A)*z}

That is, applying a matrix rotation 'by hand' to the coordinates.
Of course this is not a very satisfactory solution since composing
rotations gets very ugly very quickly.


Post a reply to this message

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