# wtf unit cross product

This topic is 4142 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

So i'm in the middle of programming collision detection routines, and I am doing a cross product of two unit vectors: u1 = < 0.5, .866, 0.0 > u2 = < 0.0, 1.0, 0.0 > u1 x u2 = < 0.0, 0.0, -0.5 > | u1 x u2 | = 0.5 // ??? It was my understanding that the cross product of two unit vectors is always another unit vector, but this is clearly not the case. I did the math twice using my math library and a calculator, so it's not that. does anybody have an explanation for this behavior, or is there some condition for that assumption that i'm missing?

##### Share on other sites
MathWorld. Equations 6 and 7 should answer your question: |u x v| = |u| |v| sin(uv).

The fact that the result varies with the orientation of u and v is to be expected: as u overlaps with v, you suddenly get (0,0,0), which would be a "hop" (discontinuation? I don't know the correct English term) if u x v would be constant. And since computing the cross product does not involve operations which can suddenly introduce such hops... (ignore this last paragraph if it's not clear what I mean)

##### Share on other sites
The cross product of two unit vectors is a unit vector only if they are perpendicular. If they are parallel the cross product is zero. The general rule is

| u1 x u2 | = | u1 | | u2 | sin t

where t is the angle between the vectors. If they are both unit vectors this reduces to

| u1 x u2 | = sin t

, which is what you have, and from which you can work out the angle between the vectors.

##### Share on other sites
ok thanks, i'll remember that in the future.

1. 1
2. 2
3. 3
Rutin
18
4. 4
5. 5
JoeJ
12

• 14
• 22
• 9
• 31
• 18
• ### Forum Statistics

• Total Topics
632618
• Total Posts
3007477
• ### Who's Online (See full list)

There are no registered users currently online

×