View Single Post
Peter5897
#1
Apr21-07, 04:19 PM
P: 16
I've got a computer graphics final coming up and for some reason my brain is crapping out when it comes to, what should be, a simple problem.

I know how to align two arbitrary 3D vectors (axis-angle) but 2D in 2D I'm having trouble remembering how to do it.

On my review sheet it states

1. The problem statement, all variables and given/known data

In 2D, computer the 3x3 matrix that aligns V = (Vx, Vy) with W = (Wx, Wy)

2. Relevant equations

I suppose the rotation matrix would be a start.

----------------------------
| cos(theta) -sin(theta) 0 |
| sin(theta) cos(theta) 0 |
| 0 0 1 |
---------------------------

3. The attempt at a solution

I know that theta = arccos(v dot w) but I believe that on a test shoving in an arccos won't be sufficient. IE

--------------------------------------------------
| cos(arccos(v dot w)) -sin(arccos(v dot w)) 0 |
| sin(arccos(v dot w)) cos(arccos(v dot w)) 0 |
| 0 0 1 |
---------------------------------------------------

Pretty gross looking if you ask me.

My question to you is, what am I forgetting? I believe there must be some simple linear algebra theorem that I am currently drawing a blank on, or is this really the best way?

Thanks for any insight you guys could bring,
-Peter

PS, sorry for my awful attempt at making matrices, the formatting seems to change during the submission process.

PPS, probably should have put this in the pre-calc section... whoops.
Phys.Org News Partner Science news on Phys.org
'Office life' of bacteria may be their weak spot
Lunar explorers will walk at higher speeds than thought
Philips introduces BlueTouch, PulseRelief control for pain relief