Module imagingbook.common
Class CircleSampler
java.lang.Object
imagingbook.common.geometry.fitting.circle.utils.CircleSampler
Defines utility methods for picking random points on a given circle.
-
Constructor Summary
ConstructorsConstructorDescriptionCircleSampler
(GeometricCircle circle) CircleSampler
(GeometricCircle circle, long seed) -
Method Summary
Modifier and TypeMethodDescriptionPnt2d[]
getPoints
(int n, double startAngle, double endAngle, double sigma) Creates and returns an array of 2D points sampled on the circle associated with thisCircleSampler
.
-
Constructor Details
-
CircleSampler
-
CircleSampler
-
-
Method Details
-
getPoints
Creates and returns an array of 2D points sampled on the circle associated with thisCircleSampler
. Random Gaussian noise (with standard deviation sigma) is added to the individual x/y coordinates.- Parameters:
n
- number of points to samplestartAngle
- initial angle (in radians)endAngle
- final angle (in radians)sigma
- sigma of Gaussian noise- Returns:
- an array of sample points
-