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

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Howdy, CPAN has some great modules out on Math, Trig and 3D. Or at least they look great! I've been searching for some examples in use so i can join in. The documentation covers the names of functions but a concrete example slips my grasp so i can use it myself. I've looked at Math::Trig and Math::Project3D.

I want to rotate a 3d vector by a certain amount and return the new vector points so my app can do stuff with it. The 3d vector i have is a point on the edge of a sphere in 3d space. I want to rotate this point by foo and get the 3 vector points back in a subroutine.

I would include some code but its basically the example from Math:Project3D. Which i hope i do not need. Any advice, or known examples are greatly appreciated. Zaxo had a nice snippet but i got lost in the fact that there were only 2 vector points. Seems like the answer is in there somewhere though.

thanks for reading.

jtrue

In reply to Rotate a 3D vector by true

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (1)
As of 2023-01-29 02:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?