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
The angle to rotate by, θ.
cos(θ)
.sin(θ)
.Methods
Apply this
Rotate
to a vector.The inverse
HomogeneousTransformation
of this one.- inverse()
The inverse
HomogeneousTransformation
of this one.
- angle
The angle to rotate by, θ.
- cos_angle
cos(θ)
.
- sin_angle
sin(θ)
.