saelgv_c |

Table of contents## Proceduresaelgv_c ( Semi-axes of ellipse from generating vectors ) void saelgv_c ( ConstSpiceDouble vec1 [3], ConstSpiceDouble vec2 [3], SpiceDouble smajor[3], SpiceDouble sminor[3] ) ## AbstractFind semi-axis vectors of an ellipse generated by two arbitrary three-dimensional vectors. ## Required_ReadingELLIPSES ## KeywordsELLIPSE GEOMETRY MATH ## Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- vec1, vec2 I Two vectors used to generate an ellipse. smajor O Semi-major axis of ellipse. sminor O Semi-minor axis of ellipse. ## Detailed_Inputvec1, vec2 are two vectors that define an ellipse. The ellipse is the set of points in 3-space center + cos(theta) vec1 + sin(theta) vec2 where theta is in the interval ( -pi, pi ] and `center' is an arbitrary point at which the ellipse is centered. An ellipse's semi-axes are independent of its center, so the vector `center' shown above is not an input to this routine. `vec2' and `vec1' need not be linearly independent; degenerate input ellipses are allowed. ## Detailed_Outputsmajor, sminor are semi-major and semi-minor axes of the ellipse, respectively. `smajor' and `sminor' may overwrite either of `vec1' or `vec2'. ## ParametersNone. ## Exceptions1) If one or more semi-axes of the ellipse is found to be the zero vector, the input ellipse is degenerate. This case is not treated as an error; the calling program must determine whether the semi-axes are suitable for the program's intended use. ## FilesNone. ## ParticularsTwo linearly independent but not necessarily orthogonal vectors `vec1' and `vec2' can define an ellipse centered at the origin: the ellipse is the set of points in 3-space center + cos(theta) vec1 + sin(theta) vec2 where theta is in the interval (-pi, pi] and `center' is an arbitrary point at which the ellipse is centered. This routine finds vectors that constitute semi-axes of an ellipse that is defined, except for the location of its center, by `vec1' and `vec2'. The semi-major axis is a vector of largest possible magnitude in the set cos(theta) vec1 + sin(theta) vec2 There are two such vectors; they are additive inverses of each other. The semi-minor axis is an analogous vector of smallest possible magnitude. The semi-major and semi-minor axes are orthogonal to each other. If `smajor' and `sminor' are choices of semi-major and semi-minor axes, then the input ellipse can also be represented as the set of points center + cos(theta) smajor + sin(theta) sminor where theta is in the interval (-pi, pi]. The capability of finding the axes of an ellipse is useful in finding the image of an ellipse under a linear transformation. Finding this image is useful for determining the orthogonal and gnomonic projections of an ellipse, and also for finding the limb and terminator of an ellipsoidal body. ## Examples1) An example using inputs that can be readily checked by hand calculation. Let vec1 = ( 1., 1., 1. ) vec2 = ( 1., -1., 1. ) The function call ## RestrictionsNone. ## Literature_References[1] T. Apostol, "Calculus, Vol. II," chapter 5, "Eigenvalues of Operators Acting on Euclidean Spaces," John Wiley & Sons, 1969. ## Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) W.L. Taber (JPL) ## Version-CSPICE Version 1.0.1, 13-APR-2021 (JDR) Edited the header to comply with NAIF standard. -CSPICE Version 1.0.0, 12-JUN-1999 (NJB) (WLT) ## Index_Entriessemi-axes of ellipse from generating vectors |

Fri Dec 31 18:41:11 2021