#include <boost/random/niederreiter_base2.hpp>
#include <boost/random/uniform_01.hpp>
#include <boost/math/constants/constants.hpp>
#include <boost/tuple/tuple.hpp>
boost::random::niederreiter_base2 gen(4);
int main()
{
typedef boost::tuple<double, double, double> point_t;
const std::size_t n_points = 100;
std::vector<point_t> points;
points.reserve(n_points);
boost::random::uniform_01<double> dist;
for (std::size_t i = 0; i != n_points; ++i)
{
double cos_theta = 1 - 2 * dist(gen);
double sin_theta = std::sqrt(1 - cos_theta * cos_theta);
double phi = boost::math::constants::two_pi<double>() * dist(gen);
double sin_phi = std::sin(phi), cos_phi = std::cos(phi);
point_t point_on_sphere(sin_theta*sin_phi, cos_theta, sin_theta*cos_phi);
points.push_back(point_on_sphere);
}
return 0;
}