I recently added a UnitBallSampler to the sampling module to sample
coordinates inside a unit ball. I also have a working TriangleSampler to
sample within a triangle and intend to create a TetrahedronSampler to
sample within a tetrahedron.

Currently in the released version (1.3) we only have a UnitSphereSampler in:

o.a.c.rng.sampling

The only other package is o.a.c.rng.sampling.distribution for probability
distributions.

Should new coordinate based samplers be moved to a package inside for
example:

o.a.c.rng.sampling.geometry
o.a.c.rng.sampling.shape

These shape samplers also require a valid input for the geometry. Currently
in my working example for the TriangleSampler I have not validated the
input is a triangle. I state that if the points are collinear then the
distribution of the samples is undefined. It will not be uniform on the
line segment connecting the vertices.

I think that validation of the input shape is out of scope. Are shape
samplers themselves also out of scope for RNG and would be a better fit in
commons Geometry?

Reply via email to