Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Rotate a 3D vector

by FoxtrotUniform (Prior)
on Oct 18, 2004 at 00:28 UTC ( #400011=note: print w/replies, xml ) Need Help??


in reply to Re: Rotate a 3D vector
in thread Rotate a 3D vector

Well, the quick-and-dirty way to do it is to scale your x component by cos(t) and your y component by sin(t). You might be happier with a matrix-based solution in the long run, though.

Edit: The math above is, of course, totally bogus. I plead momentary imbecility. johnnywang has the correct solution. D'oh!

What kind of program are you writing, btw?

--
Yours in pedantry,
F o x t r o t U n i f o r m

"Lines of code don't matter as long as I'm not writing them." -- merlyn

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2020-11-30 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?