Boost logo

Boost Users :

Subject: [Boost-users] boost random in 2 dimensions
From: Danny (dsudhan89_at_[hidden])
Date: 2013-01-25 11:57:28


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:

http://stackoverflow.com/questions/2254909/boost-random-number-generator

Here they use boost::uniform_int<> to generate numbers as int in a single
dimension.

But in my case I wish to generate numbers as float in two dimensions over a
plane.

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.)

Is it possible to to this using boost library?

--
View this message in context: http://boost.2283326.n4.nabble.com/boost-random-in-2-dimensions-tp4641761.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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