How do i get the rotation matrix required (a 4 by 4 one) to Rotate an object such that it faces a vector (that is the object's local y axis points towards the vector)
Asked
Active
Viewed 54 times
0
-
A $4 \times 4$ rotation matrix? Are you working in $\Bbb{R}^4$? – user771918 Apr 13 '20 at 14:42
-
1@user No: they're working in homogeneous coordinates – Ben Grossmann Apr 13 '20 at 14:47
-
@S It is unclear what you mean by "faces a vector" or "points towards the vector". – Ben Grossmann Apr 13 '20 at 14:50
-
Yes I am using homogeneous coordinates as I am using opengl – Siddhartha Singh Apr 13 '20 at 14:51
-
I mean points towards the vector – Siddhartha Singh Apr 13 '20 at 14:51
-
By facing the vector I mean that the line representing the vector and the object's y axis coincides – Siddhartha Singh Apr 14 '20 at 03:45
-
There’s an infinite number of such rotations. Do you have any other criteria or constraints? Here’s a way to construct one of them. If you do some searching on this site, you’ll find quite a few other questions like yours. – amd Apr 14 '20 at 07:05
