Uploaded image for project: 'Commons RNG'
  1. Commons RNG
  2. RNG-135

TetrahedronSampler: Sample uniformly from a tetrahedron

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • 1.4
    • 1.4
    • sampling
    • None

    Description

      Create a sampler to sample uniformly within a tetrahedron.
       

      public abstract class TetrahedronSampler implements 
              SharedStateSampler<TetrahedronSampler> {
          public static TetrahedronSampler of(double[] a,
                                              double[] b,
                                              double[] c,
                                              double[] d,
                                              UniformRandomProvider rng);
      }
      

      Inputs a,b,c,d are the vertices.

      Sampling can be performed using the algorithm of:

      Rocchini, C & Cignoni, P (2001)
      Generating Random Points in a Tetrahedron.
      Journal of Graphics Tools 5(4), pp 9-12.
      

      DOI: 10.1080/10867651.2000.10487528

      Attachments

        Issue Links

          Activity

            People

              aherbert Alex Herbert
              aherbert Alex Herbert
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h