public class DistanceFromEllipsoidSurfaceOp extends AbstractBinaryFunctionOp<Ellipsoid,org.joml.Vector3dc,DoubleType>
Uses a hard-coded bivariate Newton-Raphson solver to efficiently find values of theta and phi that solve the orthogonality condition F(theta,phi)=0 for the vector between the surface and the point. Then converts into Cartesian coordinates to calculate the distance. Derivation of required terms courtesy of Robert Nürnberg, Imperial College London (See https://wwwf.imperial.ac.uk/~rn/distance2ellipse.pdf). Works for three-dimensional case only.
SpecialOp.Flavor| Constructor and Description |
|---|
DistanceFromEllipsoidSurfaceOp() |
| Modifier and Type | Method and Description |
|---|---|
DoubleType |
calculate(Ellipsoid ellipsoid,
org.joml.Vector3dc point)
Calculates the shortest distance between a point and the surface of an
ellipsoid
|
in1, in2, out, run, setInput1, setInput2ops, setEnvironmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcalculate, getIndependentInstance, runin, setInputcalculate, runruncandidates, filterArity, opops, setEnvironmentinitializepublic DoubleType calculate(Ellipsoid ellipsoid, org.joml.Vector3dc point) throws IllegalArgumentException
ellipsoid - the ellipsoid in questionpoint - the point in questionIllegalArgumentException - if tolerance is negative, or
maxIterations is not positive.Copyright © 2018–2022 BoneJ. All rights reserved.