Boost logo

Boost Users :

Subject: Re: [Boost-users] boost random in 2 dimensions
From: Norbert Wenzel (norbert.wenzel.lists_at_[hidden])
Date: 2013-01-25 13:02:21


On 01/25/2013 05:57 PM, Danny wrote:
> I am trying to use a boost random generator to make random points uniformly
> distributed over a plane surface. In the the following link, the code for
> doing it in a single dimension is available:
>
> [...]
>
> Is there any distribution type available to use it in two dimensions? (I
> have seen boost::uniform_on_sphere, but it is for spherical surfaces.)

In case of a plane, what speaks against using two uniformly distributed
floats in range [0 1] as UV parameters in your plane? That should give
uniformly distributed points in the plane, or am I missing something here?

Norbert


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net