cspice_cgv2el

 Abstract I/O Examples Particulars Required Reading Version Index_Entries

#### Abstract

```
CSPICE_CGV2EL forms a SPICE ellipse from a center vector and two generating
vectors.

```

#### I/O

```
Given:

center   the location for an ellipse center.

[3,1] = size(center); double = class(center)

vec1 &
vec2     the two vectors defining the ellipse (the generating vectors)
with the 'center' in three-dimensional space. The ellipse is
the set of points

center  +  cos(theta) vec1  +  sin(theta) vec2

where theta ranges over the interval (-pi, pi].

'vec1' and 'vec2' need not be linearly independent.

[3,1] = size(vec1); double = class(vec1)

[3,1] = size(vec2); double = class(vec2)

the call:

ellipse = cspice_cgv2el( center, vec1, vec2 )

returns:

ellipse   a structure describing a SPICE ellipse defined by the input
vectors.

[1,1] = size(ellipse); struct = class(ellipse)

The structure has the fields:

center:    [3,1] = size(center); double = class(center)
semiMinor: [3,1] = size(semiMinor); double = class(semiMinor)
semiMajor: [3,1] = size(semiMajor); double = class(semiMajor)

```

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

%
% Define the center and two linearly independent
% generating vectors of an ellipse (the vectors need not
% be linearly independent).
%
center = [ -1.;  1.; -1. ];
vec1   = [  1.;  1.;  1. ];
vec2   = [  1.; -1.;  1. ];

%
% Create the CSPICE_ELLIPSE structure.
%
ellipse = cspice_cgv2el( center, vec1, vec2 );

ellipse.semiMinor
ellipse.semiMajor
ellipse.center

MATLAB outputs for ellipse.semiMinor:

ans =

0.0000
1.4142
0.0000

MATLAB outputs for ellipse.semiMajor:

ans =

1.4142
-0.0000
1.4142

MATLAB outputs for ellipse.center:

ans =

-1
1
-1

```

#### Particulars

```
SPICE ellipses serve to simplify calling sequences and reduce
the chance for error in declaring and describing argument lists
involving ellipses.

The set of ellipse conversion routines is

cspice_cgv2el( Center and generating vectors to ellipse )
cspice_el2cgv( Ellipse to center and generating vectors )

```

#### Required Reading

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

MICE.REQ
ELLIPSES.REQ

```

#### Version

```
-Mice Version 1.0.1, 09-NOV-2012, EDW (JPL)

Edited I/O section to conform to NAIF standard for Mice documentation.

-Mice Version 1.0.0, 30-DEC-2008, EDW (JPL)

```

#### Index_Entries

```
center and generating vectors to ellipse

```
`Wed Apr  5 18:00:30 2017`