Rotate

class Rotate(angle: float)

A Rotate transformation rotates a vector around (0, 0, 0) by a given angle θ.

This uses the axis-angle representation, but is restricted to the axis (0, 0, 1). In the future, this can be updated to allow for rotations not in the XY-plane.

Its matrix looks like:

┏                                  ┓
┃  cos(θ)  -sin(θ)    0       0    ┃
┃  sin(θ)   cos(θ)    0       0    ┃
┃     0       0       1       0    ┃
┃     0       0       0       1    ┃
┗                                  ┛

Attributes

angle

The angle to rotate by, θ.

cos_angle

cos(θ).

sin_angle

sin(θ).

Methods

apply

Apply this Rotate to a vector.

inverse

The inverse HomogeneousTransformation of this one.

apply(vector: ndarray[3]) ndarray[3]

Apply this Rotate to a vector.

inverse()

The inverse HomogeneousTransformation of this one.

angle

The angle to rotate by, θ.

cos_angle

cos(θ).

sin_angle

sin(θ).