How do I generate 2 vectors that are paralell to 1?
Okay, I need to generate 2 vectors that are perpendicular to each other and one that is already given ie. a normal. I've given it some thought and this is what I came up with: Let's say you have 3 vectors that are perpendicular to each other, a=<1,0,0>, b=<0,1,0>, c=<0,0,1>. Now all you have to do is rotate a to were it equals the normal in question, and rotate b and c to keep them perpendicular. So it all basicaly boils down to this: Find x, y, and z angles and rotate a by that angle so that it faces the same direction as the normal. Also, will someone care to explain 3D rotation using matices to me :) ?
Ill make myslef more clear....
All I need to do is find the 2 vectors that are perpendicular to vector n.