POV-Ray : Newsgroups : povray.off-topic : Rotating vectors in 3D : Rotating vectors in 3D Server Time
6 Sep 2024 21:21:26 EDT (-0400)
  Rotating vectors in 3D  
From: Severi Salminen
Date: 12 Oct 2008 13:30:30
Message: <48f23436$1@news.povray.org>
My head is spinning. I have a fairly simple task:

V1 = 0,1,0 (this is a vector pointing up along y-axis)
V2 = user defined unit vector pointing anywhere.

How do I rotate V1 using rotateX(), rotateY() and rotateZ() so that it
equals V2?

This would be intersting, too:

What is the resulting 4x4 transformation matrix that does the same thing?

Actually, I'd prefer just the transformation matrix because I guess I
could avoid using trigonometric functions back and forth.

Thanks,
Severi S.


Post a reply to this message

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