Table of contents
CSPICE_FRAME builds a right handed orthonormal frame (x,y,z) from a
3-dimensional input vector, where the X-axis of the resulting
frame is parallel to the original input vector.
Given:
x a 3-dimensional vector used to form the first vector
of a right-handed orthonormal triple.
help, x
DOUBLE = Array[3]
the call:
cspice_frame, x, y, z
returns:
x,
y,
z the 3-dimensional unit vectors that form a right handed
orthonormal frame, where `x' is now a unit vector parallel to
the original input vector in `x'.
help, x
DOUBLE = Array[3]
help, y
DOUBLE = Array[3]
help, z
DOUBLE = Array[3]
There are no special geometric properties connected to `y' and
`z' (other than that they complete the right handed frame).
Note: as the routine reads and writes to the argument list, the
user must declare the inputs a double precision 3-vectors prior
to the call.
None.
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
1) Given some arbitrary vector, create three right handed orthonormal
frames, each of them with a different coordinate-axis parallel to
that vector.
Example code begins here.
PRO frame_ex1
;;
;; Declare the size of the frame vectors prior to use.
;; Recall, the user must declare all read-write arguments
;; prior to use.
;;
x = dblarr(3)
y = dblarr(3)
z = dblarr(3)
;;
;; Given some arbitrary vector
;;
vec = [ 23.d, -3.d, 18.d ]
uvec = vec/norm(vec)
print, 'Unitary input vector'
print, uvec
print, ''
;;
;; Create an orthonormal frame with the
;; x axis parallel to vec.
;;
x = vec
cspice_frame, x, y, z
print, 'Input vector parallel to output X vector'
print, 'X', x
print, 'Y', y
print, 'Z', z
print, ''
;;
;; Alternative, make a frame with y parallel to
;; vec...
;;
x = dblarr(3)
y = dblarr(3)
z = dblarr(3)
y = vec
cspice_frame, y, z, x
print, 'Input vector parallel to output Y vector'
print, 'X', x
print, 'Y', y
print, 'Z', z
print, ''
;;
;; ...or a frame with z parallel to vec.
;;
x = dblarr(3)
y = dblarr(3)
z = dblarr(3)
z = vec
cspice_frame, z, x, y
print, 'Input vector parallel to output Z vector'
print, 'X', x
print, 'Y', y
print, 'Z', z
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
Unitary input vector
0.78338311 -0.10218041 0.61308243
Input vector parallel to output X vector
X 0.78338311 -0.10218041 0.61308243
Y 0.61630826 0.0000000 -0.78750500
Z 0.080467580 0.99476588 0.062974628
Input vector parallel to output Y vector
X 0.080467580 0.99476588 0.062974628
Y 0.78338311 -0.10218041 0.61308243
Z 0.61630826 0.0000000 -0.78750500
Input vector parallel to output Z vector
X 0.61630826 0.0000000 -0.78750500
Y 0.080467580 0.99476588 0.062974628
Z 0.78338311 -0.10218041 0.61308243
Note the positive nature of the permutation on x-y-z
in the cspice_frame call.
Given an input vector x, this routine returns unit vectors x,
y, and z such that xyz forms a right-handed orthonormal frame
where the output x is parallel to the input x.
This routine is intended primarily to provide a basis for
the plane orthogonal to x. There are no special properties
associated with y and z other than that the resulting xyz frame
is right handed and orthonormal. There are an infinite
collection of pairs (y,z) that could be used to this end.
Even though for a given x, y and z are uniquely determined, users
should regard the pair (y,z) as a random selection from this
infinite collection.
For instance, when attempting to determine the locus of points
that make up the limb of a triaxial body, it is a straightforward
matter to determine the normal to the limb plane. To find
the actual parametric equation of the limb one needs to have
a basis of the plane. This routine can be used to get a basis
in which one can describe the curve and from which one can
then determine the principal axes of the limb ellipse.
1) If `x' on input is the zero vector the "standard" frame (ijk)
is returned.
2) If any of the input arguments, `x', `y' or `z', is undefined,
an error is signaled by the IDL error handling system.
3) If any of the input arguments, `x', `y' or `z', is not of the
expected type, or it does not have the expected dimensions and
size, an error is signaled by the Icy interface.
None.
None.
ICY.REQ
None.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.0.2, 10-AUG-2021 (JDR)
Added arguments' type and size information in the -I/O section.
Edited the header to comply with NAIF standard. Added example's problem
statement and reformatted example's output.
Added -Parameters, -Exceptions, -Files, -Restrictions,
-Literature_References and -Author_and_Institution sections.
Removed reference to the routine's corresponding CSPICE header from
-Abstract section.
-Icy Version 1.0.1, 29-APR-2011 (EDW)
Edits to -I/O and -Particulars sections so as to parallel Mice
version.
-Icy Version 1.0.0, 16-JUN-2003 (EDW)
build a right handed coordinate frame
|