POV-Ray : Newsgroups : povray.advanced-users : rotating in a function : rotating in a function Server Time
3 Jul 2024 05:21:51 EDT (-0400)
  rotating in a function  
From: Leroy Whetstone
Date: 28 Feb 2009 23:48:33
Message: <49AA1368.4040206@joplin.com>
I use:
Ang = angle in radians
Fnc=function(x,y,z,Ang){Fna((x-.50)*cos(Ang)+(y-.433)*sin(Ang)+.50,
                     -(x-.50)*sin(Ang)+(y-.433)*cos(Ang),1)+.433};
to rotate a egualaterial triangle in place whose base is at <0,0,0> to 
<1,0,0> and peak is at <.5,.866,0>.
It works when Ang=0.
But doesn't when Ang=radians(120) or Ang=radians(120).

Any Ideas?

I've even try translating another corner of triangle to <0,0,0>
rotating then translating back. Close but there's a noticable gap
from the true triangle.


Post a reply to this message

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