java.lang.Object
imagingbook.common.geometry.fitting.ellipse.utils.EllipseSampler

public class EllipseSampler extends Object
Utility class for picking random points on a given ellipse.
Version:
2022/11/17
  • Constructor Details

  • Method Details

    • getPoints

      public Pnt2d[] getPoints(int n, double startAngle, double arcAngle, double sigma)
      Creates and returns an array of 2D points sampled on the ellipse associated with this EllipseSampler. Random Gaussian noise (with standard deviation sigma) is added to the individual x/y coordinates.
      Parameters:
      n - number of points
      startAngle - initial angle (radians)
      arcAngle - arc angle (radians)
      sigma - amount of random noise
      Returns:
      an array of sample points