Example usage for org.apache.commons.math3.geometry.spherical.twod Circle Circle

List of usage examples for org.apache.commons.math3.geometry.spherical.twod Circle Circle

Introduction

In this page you can find the example usage for org.apache.commons.math3.geometry.spherical.twod Circle Circle.

Prototype

public Circle(final S2Point first, final S2Point second, final double tolerance) 

Source Link

Document

Build a great circle from two non-aligned points.

Usage

From source file:org.orekit.models.earth.tessellation.EllipsoidTessellator.java

/** Check if an arc meets the inside of a zone.
 * @param s1 first point// www  .j  a v a  2s .co m
 * @param s2 second point
 * @param zone zone to check arc against
 * @return true if the arc meets the inside of the zone
 */
private boolean meetInside(final S2Point s1, final S2Point s2, final SphericalPolygonsSet zone) {
    final Circle circle = new Circle(s1, s2, zone.getTolerance());
    final double alpha1 = circle.toSubSpace(s1).getAlpha();
    final double alpha2 = MathUtils.normalizeAngle(circle.toSubSpace(s2).getAlpha(), alpha1 + FastMath.PI);
    final SubCircle sub = new SubCircle(circle, new ArcsSet(alpha1, alpha2, zone.getTolerance()));
    return recurseMeetInside(zone.getTree(false), sub);

}