POV-Ray : Newsgroups : povray.newusers : Rotating triangle around middle point : Re: Rotating triangle around middle point Server Time
30 Jun 2024 03:28:00 EDT (-0400)
  Re: Rotating triangle around middle point  
From: Stephen
Date: 11 Sep 2011 19:18:46
Message: <4e6d41d6$1@news.povray.org>
On 11/09/2011 10:52 PM, RayZ wrote:
> Hi, once again I've stumbled upon a problem. I have two triangles which are not
> parallel to any axis. I want it so that one of the triangles rotates around in
> place until it is pointing the opposite way of the other one, forming a
> hexagram.
> If I use scale -1, the triangle does go to it's opposite, but as soon as I put
> in a clock the "rotating" triangle shrinks and continues to grow in size
> pointing the opposite way all the time.

I read your question differently from Alain. It all depends how you want 
your triangle to rotate. If you want it to rotate around its centre of 
gravity. then you construct it so that the centre of gravity (or the 
centre of rotation) is at the origin. Rotate it, with the clock 
variable, then move it to the required position. You may need to rotate 
it using the three axis and the sin and cos functions.

-- 
Regards
     Stephen


Post a reply to this message

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