Boost logo

Boost :

From: Henrik Sundberg (storangen_at_[hidden])
Date: 2007-06-05 15:54:26

I doubt that the trig-version gives a good distribution:

inlineVectortrig(uniform_01<generator_type>&random) {
   returnVector(cos_theta,sin_theta*cos(phi),sin_theta *sin(phi));

The result ought to be more dense at the poles.


2007/6/5, more effective thinking in the exceptional C++ programming
language <effective.thinking_at_[hidden]>:
> Dear,
> I'm a newcomer on the boost list. I subscribed to share the results of my
> experiments on picking random points on sphere. This procedure is often a
> bottleneck for very fast Monte-Carlo simulations of physical process where
> you must pick vectors in random directions. I compiled a document that
> explain the experiments and the results. The conclusion contains some
> propositions to modify boost::random_on_sphere and I would like to know if a
> new implementation following the presented ideas would be welcome.
> Colas Schretter
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at