Alex Herbert created RNG-135: -------------------------------- Summary: TetrahedronSampler: Sample uniformly from a tetrahedron Key: RNG-135 URL: https://issues.apache.org/jira/browse/RNG-135 Project: Commons RNG Issue Type: New Feature Components: sampling Affects Versions: 1.4 Reporter: Alex Herbert Assignee: Alex Herbert
Create a sampler to sample uniformly within a [tetrahedron|https://en.wikipedia.org/wiki/Tetrahedron]. {code:java} public abstract class TetrahedronSampler implements SharedStateSampler<TetrahedronSampler> { public static TetrahedronSampler of(double[] a, double[] b, double[] c, double[] d, UniformRandomProvider rng); } {code} Inputs {{a,b,c,d}} are the vertices. Sampling can be performed using the algorithm of: {noformat} Rocchini, C & Cignoni, P (2001) Generating Random Points in a Tetrahedron. Journal of Graphics Tools 5(4), pp 9-12. {noformat} [DOI: 10.1080/10867651.2000.10487528|https://dx.doi.org/10.1080/10867651.2000.10487528] -- This message was sent by Atlassian Jira (v8.3.4#803005)