POV-Ray : Newsgroups : povray.newusers : Rotate Help : Rotate Help Server Time
1 Jul 2024 02:36:12 EDT (-0400)
  Rotate Help  
From: Carl
Date: 25 Sep 2011 15:15:00
Message: <web.4e7f7cb8d299d1538276e01c0@news.povray.org>
Ok... I'm doing something I've done many times before but for some reason things
aren't behaving as I expect.  I'm sure this is something stupid on my part but I
haven't found it yet.  Look at this code:

camera {location <-1,0,-1>*4 look_at <0,0,0> angle 12 up z right x}

#declare W1 = vnormalize(<-1,0,-1>);
#declare W1A = vaxis_rotate(W1,<1,0,-1>,10.3923*2/3);
#declare W2 = y;
#declare W3 = vaxis_rotate(W2,W1A,120);
#declare W4 = vaxis_rotate(W2,W1A,240);

cylinder {<0,0,0>,W1A*1.1,0.01 pigment{Green}}
cylinder {<0,0,0>,W1*1.1,0.01 pigment{Red}}

#declare Slidey = intersection {
  plane {-W2,-0.01}
  plane {-W3,-0.01}
  plane {-W4,-0.01}
  sphere {<0,0,0>,1 texture {pigment{Blue} finish{ambient 0}}}
}

object {Slidey}
object {Slidey rotate W1*180}

W1 is the axis you see end on here as the red dot:
http://wwwmwww.com/PovRay/test3.png

If you rotate 180 degress about this axis should I get a blue triangle pointed
down just below the red dot?

Let's replace the last line with
object {Slidey rotate W1A*60}

I'm now trying to rotate the blue shape by 60 degrees about the green axis.
I.e. the center of the triangle shouldn't move.  But it does.  Look here:
http://wwwmwww.com/PovRay/test2.png

Someone please tell me what I'm doing wrong.

Pulling my hair out...
Carl


Post a reply to this message

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