Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I've read the article a couple of times by now. Let me comment on that.

I've been planning to randomize my rotation subroutine by doing three subsequent arbitrary rotations about each axis in cartesian space, i.e. arbitrary rotation with independent randomization for each axis x, y and z. These however have to be randomized by two randomization processes each, as the sign of the cosine corresponding to the randomized sine has to randomized, too (if I'm not mistaken here, cf. my reply to moritz comment on correctness). Hence, my (thanks to your comments) improved idea would involve six randomizations for each arbitrary rotation, while the method posted on wolfram would involve only two (cf. equations 9 to 11 in the article), correct?

What I'm asking myself right now is the following: Moritz is absolutely correct, as a single rotation about one axis (which was my original question) results in omitting half of the angles, consequently incompleteness and bias towards rotation angles below 180°. Would this still be true, if the routine is applied about each axis xyz? So, if Marsaglia (1972) uses two randomizations to produce an arbitrary point in three dimensional space in the polar coordinate system, would three randomizations in cartesian space still result in incompleteness? I think so, because equations 13 to 15 imply, that at least four randomizations are needed in cartesian space... ?

P.S.: MidLifeXis: Thank you, I found  use Benchmark qw(:all) ;on http://perldoc.perl.org/Benchmark.html


In reply to Re^2: computational efficiency by thelycaeum
in thread computational efficiency by thelycaeum

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?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-24 05:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found