
Algebra PreAlgebra and Basic Algebra Math Forum 
 LinkBack  Thread Tools  Display Modes 
October 20th, 2011, 04:53 PM  #1 
Newbie Joined: Oct 2011 Posts: 1 Thanks: 0  Determining a 3D Vector B after a rotation of 3D Vector A
Hello, I recognize that my question is most likely to be trivial for most of you. My background is that i am working on a small 3d game and i am not too familiar with 3d transformations; hence my present request... I have two 3D lines, let's call them Line A and Line B. An angle Alpha between A and B. The current use case deals with rotating the Line A; and expecting Line B would "follow" and the Angle Alpha will be kept between A and B. A rotation matrix for this purpose; and it works fine in most of the cases. However, i am encountering some issues in some specific case when the cross product of Vector A and Vector B (which would have the vector representation of Line A and B) is equal to 0 for all coordinates, i.e. A^B = 0 (x=0, y = 0 , z = 0). For example, let's imagine Line A having the following coordinates: From x = 1 y= 4 z = 0 to x=1 y = 0 z = 0 Line B has the coordinates : x = 1 y = 1 z = 3 ; angle between both is 90 When i rotate Line A to 90 degrees i obtain the following coordinates: from x = 1 y = 4 z = 0 to x = 5 y = 4 z = 0 This is fine. However, i obtain Line B with coordinates x = 5 y = 4 z = 0 to x = 8 ; y = 4 and z = 0 . The desired result would be Line B : starting from x = 5 , y = 4 , z = 0 to x = 5 , y = 4 and z = 3 I have observed when the cross product is 0 ; the unit vector is z = 1 instead of unit vector = x = 1. The problem is that i can see both options are valid; but i did not figure out yet how to make a clear choice. My question is then would any of you know some 3d transformation matrixes or formulas which could help me not only to address the common cases but also the specific case above ? Any pointers are very welcome Babarorhum Let's call them Vector A and Vector B with an angle alpha between them. My use case is that Vector A knows rotation; the angle Alpha would remain unchanged; and i would like to obtain Vector B. Most of the cases are okay with a rotation matrix but i am encountered some difficulties when the cross product of Vector A & Vector B is actual equal to 0. For example, let's imagine a Vector A , having the following coordinates ; starting 

Tags 
determining, rotation, vector 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Determining Vector Spaces  ktbsquared  Linear Algebra  2  September 3rd, 2013 02:26 PM 
3D Vector rotation  Tiago Costa  Algebra  2  August 18th, 2013 02:54 PM 
Determining a vector that terminates on plane. HELP!?  mfetch22  Linear Algebra  0  June 17th, 2010 11:15 PM 
Rotation toward target vector, finding orientation of object  qwertygeek  Linear Algebra  0  August 20th, 2009 06:00 PM 
rotation of vector in diagonal plane  rfrank  Algebra  0  July 31st, 2009 08:05 AM 