Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Rotate a 3D vector

by Anonymous Monk
on Apr 28, 2010 at 23:02 UTC ( [id://837410]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    float distance = sqrt(v.x*v.x + v.y*v.y + v.z*v.z);
    v.x = v.x/distance;
    v.y = v.y/distance;
    v.z = v.z/distance;
    
  2. or download this
    float dotProduct = Va.x*Vb.x + Va.y*Vb.y + Va.z*Vb.z;
    
  3. or download this
    acos(dotProduct);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://837410]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-19 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found