Boost C++ Libraries: Ticket #347: boost::uniform_on_sphere in not uniform on sphere https://svn.boost.org/trac10/ticket/347 <pre class="wiki">It's clear that your previous (1.29) and current verisons (1.32) has no really uniform point distribution on sphere. This fact can be proved by observation that distributions of all coordinates are independent on each other. For example for 3D-sphere really uniform distribution is given by Euler angles (x, arcsin(2t - 1)), where x is uniformly distributed random value on [0..2*pi]. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/347 Trac 1.4.3 nobody Thu, 27 Jan 2005 18:08:18 GMT <link>https://svn.boost.org/trac10/ticket/347#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/347#comment:1</guid> <description> <pre class="wiki">Logged In: NO it is correct that each coordinate is selected independently, but with a normal distribution. (warning: the following is a little fast and loose) for a normal distribution, the probability of landing at x will be a^(-b*x^2) if you use the same distrubution for y and z, the probability of landing at (x,y,z) will thus be: a^(-b*x^2) * a^(-b*y^2) * a^(-b*z^2) = a^(-b*(x^2+y^2+z^2)) you can recognize the latter as: a^(-b*l^2), where l = length(x,y,z) in other words, the probability of landing at (x,y,z) is only a function of the *length* of (x,y,z), i.e. it is unrelated to the *direction* of (x,y,z) btw, mathworld has a great page on this subject: http://mathworld.wolfram.com/SpherePointPicking.html /michael toksvig </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>usu_acm</dc:creator> <pubDate>Fri, 28 Jan 2005 04:31:26 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/347#comment:2 https://svn.boost.org/trac10/ticket/347#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=1124226 To: nobody. Perfect! thnx a lot! </pre> Ticket