- Vector3 v(random(seed)-0.5f, random(seed)-0.5f, random(seed)-0.5f);
- sample_points[i] = normalize(v)*(0.1f+0.9f*i*i/radius_divisor);
+ float r = static_cast<float>(i)/n;
+ float z = sqrt(1.0f-r*r);
+ float d = radical_inverse(i);
+ Geometry::Angle<float> a = Geometry::Angle<float>::from_turns(d);
+ sample_points[i] = Vector3(cos(a)*r, sin(a)*r, z)*(0.1f+0.9f*d*d);