cspice_frame

 Abstract I/O Examples Particulars Required Reading Version Index_Entries
```
```

Abstract

```
CSPICE_FRAME builds a right handed orthonormal frame x,y,z,
given an input vector 'x' where the output vector 'x' is parallel
to the original input vector.

For important details concerning this module's function, please refer to
the CSPICE routine frame_c.

```

I/O

```
Given:

x   the double precision 3-vector used to form the first vector of
a right-handed orthonormal triple

the call:

cspice_frame, x, y, z

returns:

Three double precision 3-vectors:

x
y
z   form a right handed orthonormal frame, with
output 'x' parallel to the input 'x'.

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

```

Examples

```
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.

;;
;; 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 ]

;;
;; 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

;;
;; 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

;;
;; ...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

Note the positive nature of the permutation on x-y-z
in the cspice_frame call.

IDL outputs:

Vec parallel to X
X      0.78338311     -0.10218041      0.61308243
Y      0.61630826       0.0000000     -0.78750500
Z     0.080467580      0.99476588     0.062974628

Vec parallel to Y
X     0.080467580      0.99476588     0.062974628
Y      0.78338311     -0.10218041      0.61308243
Z      0.61630826       0.0000000     -0.78750500

Vec parallel to Z
X      0.61630826       0.0000000     -0.78750500
Y     0.080467580      0.99476588     0.062974628
Z      0.78338311     -0.10218041      0.61308243

```

Particulars

```
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.

```

```
ICY.REQ

```

Version

```
-Icy Version 1.0.1, 29-APR-2011, EDW (JPL)

Edits to I/O and Particulars sections so as to parallel Mice version.

-Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

```

Index_Entries

```
build a right handed coordinate frame

```
`Wed Apr  5 17:58:01 2017`