@Test public void testMatchToleranceClockwise() { Circle circle = new Circle(100); CircularArc arc = circle.getCircularArc(Math.PI, Math.PI / 2, 0); double tolerance = 1; for (int i = 0; i < 12; i++) { double[] linearized = arc.linearize(tolerance); assertTrue(linearized.length >= 64); circle.assertTolerance(linearized, tolerance); tolerance /= 4; } }
public double[] linearize(double tolerance) { initializeCenterRadius(); if (radius == COLLINEARS || radius == 0) { return controlPoints; } return linearize(tolerance, new GrowableOrdinateArray()).getData(); }
CircularArc { public double[] linearize(double tolerance) { initializeCenterRadius(); if (radius == COLLINEARS || radius == 0) { return controlPoints; } return linearize(tolerance, new GrowableOrdinateArray()).getData(); } }
CircularArc { public double[] linearize(double tolerance) { initializeCenterRadius(); if (radius == COLLINEARS || radius == 0) { return controlPoints; } return linearize(tolerance, new GrowableOrdinateArray()).getData(); } CircularArc(double[] controlPoints);  CircularArc(double sx, double sy, double mx, double my, double ex, double ey); }
CircularArc { public double[] linearize(double tolerance) { initializeCenterRadius(); if (radius == COLLINEARS || radius == 0) { return controlPoints; } return linearize(tolerance, new GrowableOrdinateArray()).getData(); } CircularArc(double[] controlPoints);  CircularArc(double sx, double sy, double mx, double my, double ex, double ey); static void setBaseSegmentsQuadrant(int baseSegmentsQuadrant); static void setMaxSegmentsQuadrant(int baseSegmentsQuadrant); int getDimension(); double[] getControlPoints(); double getRadius(); Coordinate getCenter(); double[] linearize(double tolerance); @Override String toString(); Envelope getEnvelope(); }
CircularArc { public double[] linearize(double tolerance) { initializeCenterRadius(); if (radius == COLLINEARS || radius == 0) { return controlPoints; } return linearize(tolerance, new GrowableOrdinateArray()).getData(); } CircularArc(double[] controlPoints);  CircularArc(double sx, double sy, double mx, double my, double ex, double ey); static void setBaseSegmentsQuadrant(int baseSegmentsQuadrant); static void setMaxSegmentsQuadrant(int baseSegmentsQuadrant); int getDimension(); double[] getControlPoints(); double getRadius(); Coordinate getCenter(); double[] linearize(double tolerance); @Override String toString(); Envelope getEnvelope(); static final double COLLINEARS; }