cspice_vrotv

 Abstract I/O Examples Particulars Required Reading Version Index_Entries

#### Abstract

```
CSPICE_VROTV rotates a double precision 3-vector about a specified
axis vector by a specified angle (measured in radians) then
returns the rotated vector.

```

#### I/O

```
Given:

v       a vector to rotate.

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

axis    a vector defining the axis about which to rotate 'v'.

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

theta   the value of the angle measured in radians through which

[1,1] = size(theta); double = class(theta)

the call:

r = cspice_vrotv( v, axis, theta )

returns:

r   the vector result of rotating 'v' about 'axis' through an angle
of 'theta'.

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

```

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

%
% Given an axis of rotation and angle of rotation.
%
axis  = [ 0.; 0.; 1.];
theta = cspice_halfpi;

%
% Perform rotations on various vectors...
%

Example(1):

v1 = [ 1.; 2.; 3. ];

r1 = cspice_vrotv( v1, axis, theta )

MATLAB outputs:

r1 =

-2.0000
1.0000
3.0000

Example(2):

v2 = [ 1.; 0.; 0. ];

r2 = cspice_vrotv( v2, axis, theta )

MATLAB outputs:

r2 =

0.0000
1.0000
0

Example(3):

v3 = [ 0.; 1.; 0. ];

r3 = cspice_vrotv( v3, axis, theta )

MATLAB outputs:

r3 =

-1.0000
0.0000
0

```

#### Particulars

```
None.

```

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

MICE.REQ
ROTATION.REQ

```

#### Version

```
-Mice Version 1.0.2, 18-DEC-2014, EDW (JPL)

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

-Mice Version 1.0.1, 14-JUL-2010, EDW (JPL)

-Mice Version 1.0.0, 17-APR-2008, EDW (JPL)

```

#### Index_Entries

```

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