POV-Ray : Newsgroups : povray.newusers : Rotating triangle around middle point : Rotating triangle around middle point Server Time
30 Jun 2024 03:25:00 EDT (-0400)
  Rotating triangle around middle point  
From: RayZ
Date: 11 Sep 2011 17:55:00
Message: <web.4e6d2d8138a9622beee66afe0@news.povray.org>
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.

example code for rotating triangle:

#declare a = <1,1,0>;
#declare b = <1,0,-1>;
#declare c = <0,1,-1>;

//moving
triangle{ a, b, c
pigment{rgbf <1,0,0,.5>}
translate -a/3 translate -b/3 translate -c/3
scale -1 * clock
translate a/3 translate b/3 translate c/3
}

//stationary
triangle{ a, b, c
pigment{rgbf <1,1,0,.5>}
}

any help would be appreciated, thanks.


Post a reply to this message

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