DCM.from_axisangle
DCM.from_axisangle(axis: ndarray, angle: float) → ndarray : DCM from axis-angle representation
code
Use Rodrigue’s formula to obtain the DCM from the axis-angle
representation.
where is the DCM, which rotates through an **angle**
counterclockwise about the **axis** ,
is the identity matrix, and
is the [skew-symmetric](https://en.wikipedia.org/wiki/Skew-symmetric_matrix)
matrix of .
Parameters:
: - **axis** (*numpy.ndarray*) – Axis of rotation.
- **angle** (*float*) – Angle of rotation, in radians.
Returns:
: **R** – 3-by-3 direction cosine matrix
Return type:
: numpy.ndarray
Examples
```defaultR = DCM() R.view() DCM([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]])
R.from_axisangle([0.81187135, -0.43801381, 0.38601658], 0.6742208510527136) array([[ 0.92541658, -0.31879578, -0.20487413], [ 0.16317591, 0.82317294, -0.54383814], [ 0.34202014, 0.46984631, 0.81379768]]) ```