A Flash Developer Resource Site

1. I'm bored, so I thought I would post a problem for you people to solve.

Find a unit vector that is perpendicular to both vectors a' = (-3,-1,5) and b' = (1,4,-3) and that makes an obtuse angle with the positive z-axis.  Reply With Quote

2. //a' = (-3,-1,5) and b' = (1,4,-3)
x1 = -3;
y1 = -1;
z1 = 5;
x2 = 1;
y2 = 4;
z2 = -3;
z = 1;
x = (z1*y2-z2*y1)/(x2*y1-x1*y2);
y = (z2*x1-z1*x2)/(x2*y1-x1*y2);
distance = Math.sqrt(x*x+y*y+z*z);
x /= distance;
y /= distance;
z /= distance;
trace(x);
//0.823652691289566
trace(y);
//0.193800633244604
trace(z);
//0.53295174142266

Am I right ?  Reply With Quote

Code:
```a = <-3, -1, 5>
b = <1, 4, -3>

// Cross Product
a X b = -17i - 4j - 11k

// Magnitude of Cross Product
||a X b|| = sqrt(426)

// Unit vector
a X b
----------
||a X b||

17            4           11
= - ---------i - --------j - --------k
sqrt(426)    sqrt(426)   sqrt(426)```
This vector makes an obtuse angle from the positive z-axis since it's z-component is negative (Is that sound reasoning?) Am I right?  Reply With Quote

4. ## Deleted.

Deleted.  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

 » Home » Movies » Tutorials » Submissions » Board » Links » Reviews » Feedback » Gallery » Fonts » The Lounge » Sound Loops » Sound FX » About FK » Sitemap 