public final class GreatCircle extends AbstractHyperplane<Point2S> implements EmbeddingHyperplane<Point2S,Point1S>
u
and v
lie in the great
circle plane, while the vector w
(the pole) is perpendicular to it. The
pole vector points toward the minus side of the hyperplane.
Instances of this class are guaranteed to be immutable.
GreatCircles
Modifier and Type | Method and Description |
---|---|
double |
angle(GreatCircle other)
Compute the angle between this great circle and the argument.
|
double |
angle(GreatCircle other,
Point2S pt)
Compute the angle between this great circle and the argument, measured
at the intersection point closest to the given point.
|
GreatArc |
arc(AngularInterval.Convex interval)
Create an arc on this circle consisting of the given subspace interval.
|
GreatArc |
arc(double start,
double end)
Create an arc on this circle between the given subspace azimuth values.
|
GreatArc |
arc(Point1S start,
Point1S end)
Create an arc on this circle between the given subspace points.
|
GreatArc |
arc(Point2S start,
Point2S end)
Create an arc on this circle between the given points.
|
double |
azimuth(Point2S pt)
Get the azimuth angle of a point relative to this great circle instance,
in the range
[0, 2pi) . |
double |
azimuth(Vector3D vector)
Get the azimuth angle of a vector in the range
[0, 2pi) . |
boolean |
eq(GreatCircle other,
Precision.DoubleEquivalence precision)
Return true if this instance should be considered equivalent to the argument, using the
given precision context for comparison.
|
boolean |
equals(Object obj) |
Vector3D.Unit |
getPole()
Get the pole of the great circle.
|
Point2S |
getPolePoint()
Get the spherical point located at the positive pole of the instance.
|
Vector3D.Unit |
getU()
Get the u axis of the great circle.
|
Vector3D.Unit |
getV()
Get the v axis of the great circle.
|
Vector3D.Unit |
getW()
Get the w (pole) axis of the great circle.
|
int |
hashCode() |
Point2S |
intersection(GreatCircle other)
Return one of the two intersection points between this instance and the argument.
|
double |
offset(Point2S point) |
double |
offset(Vector3D vec)
Get the offset (oriented distance) of a direction.
|
Point2S |
project(Point2S point) |
GreatCircle |
reverse() |
boolean |
similarOrientation(Hyperplane<Point2S> other) |
GreatArc |
span() |
Point2S |
toSpace(Point1S point) |
String |
toString() |
Point1S |
toSubspace(Point2S point) |
GreatCircle |
transform(Transform<Point2S> transform) |
Vector3D |
vectorAt(double azimuth)
Get the vector on the great circle with the given azimuth angle.
|
classify, contains, getPrecision
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
classify, contains
toSpace, toSubspace
public Vector3D.Unit getPole()
public Point2S getPolePoint()
public Vector3D.Unit getU()
0pi
location of the embedded subspace.public Vector3D.Unit getV()
public Vector3D.Unit getW()
#getPole()
.getPole()
public double offset(Point2S point)
The returned offset values are in the range [-pi/2, +pi/2]
,
with a point directly on the circle's pole vector having an offset of
-pi/2
and its antipodal point having an offset of +pi/2
.
Thus, the circle's pole vector points toward the minus side of
the hyperplane.
offset
in interface Hyperplane<Point2S>
offset(Vector3D)
public double offset(Vector3D vec)
The offset computed here is equal to the angle between the circle's
pole and the given vector minus pi/2
. Thus, the pole vector
has an offset of -pi/2
, a point on the circle itself has an
offset of 0
, and the negation of the pole vector has an offset
of +pi/2
.
vec
- vector to compute the offset forpublic double azimuth(Point2S pt)
[0, 2pi)
.pt
- point to compute the azimuth for[0, 2pi)
public double azimuth(Vector3D vector)
[0, 2pi)
.
The azimuth angle is the angle of the projection of the argument on the
equator plane relative to the plane's u-axis. Since the vector is
projected onto the equator plane, it does not need to belong to the circle.
Vectors parallel to the great circle's pole do not have a defined azimuth angle.
In these cases, the method follows the rules of the
Math#atan2(double, double)
method and returns 0
.vector
- vector to compute the great circle azimuth of[0, 2pi)
toSubspace(Point2S)
public Vector3D vectorAt(double azimuth)
azimuth
- azimuth angle in radianspublic Point2S project(Point2S point)
project
in interface Hyperplane<Point2S>
public GreatCircle reverse()
The returned instance has the same u-axis but opposite pole and v-axis as this instance.
reverse
in interface Hyperplane<Point2S>
public GreatCircle transform(Transform<Point2S> transform)
transform
in interface Hyperplane<Point2S>
public boolean similarOrientation(Hyperplane<Point2S> other)
similarOrientation
in interface Hyperplane<Point2S>
public GreatArc span()
span
in interface Hyperplane<Point2S>
public GreatArc arc(Point2S start, Point2S end)
start
- start pointend
- end pointIllegalArgumentException
- if the specified interval is not
convex (ie, the angle between the points is greater than pi
public GreatArc arc(Point1S start, Point1S end)
start
- start subspace pointend
- end subspace pointIllegalArgumentException
- if the specified interval is not
convex (ie, the angle between the points is greater than pi
public GreatArc arc(double start, double end)
start
- start subspace azimuthend
- end subspace azimuthIllegalArgumentException
- if the specified interval is not
convex (ie, the angle between the points is greater than pi
public GreatArc arc(AngularInterval.Convex interval)
interval
- subspace intervalpublic Point2S intersection(GreatCircle other)
thisPole.cross(otherPole)
.
The other intersection point of the pair is antipodal to this point.other
- circle to intersect withpublic double angle(GreatCircle other)
[0, pi]
.other
- great circle to compute the angle with[0, pi]
angle(GreatCircle, Point2S)
public double angle(GreatCircle other, Point2S pt)
pt
, and the angle required to rotate the tangent
line representing the current instance to align with that of the given
instance was measured. The return value lies in the range [-pi, pi)
and
has an absolute value equal to that returned by angle(GreatCircle)
, but
possibly a different sign. If the given point is equidistant from both intersection
points (as evaluated by this instance's precision context), then the point is assumed
to be closest to the point opposite the cross product of the two poles.other
- great circle to compute the angle withpt
- point determining the circle intersection to compute the angle at[-pi, pi)
angle(GreatCircle)
public Point1S toSubspace(Point2S point)
toSubspace
in interface Embedding<Point2S,Point1S>
public boolean eq(GreatCircle other, Precision.DoubleEquivalence precision)
pole
, u
, and v
vectors.other
- great circle to compare withprecision
- precision context to use for the comparisonVector3D.eq(Vector3D, Precision.DoubleEquivalence)
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.