Reflect

class Reflect(angle: float)

A Reflect transformation reflects a vector across the line passing through (0, 0, 0) making an angle, θ, with the x-axis.

Generically, this reflects a point across the plane passing through the origin with normal vector (-sin(θ), cos(θ), 0). In the future, this vector can be modified to allow for reflections not in the XY-plane.

Its matrix looks like:

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

Attributes

angle

The angle of the reflection plane, θ.

cos_double_angle

cos(2θ).

sin_double_angle

sin(2θ).

Methods

apply

Apply this Reflect to a vector.

inverse

The inverse HomogeneousTransformation of this one.

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

Apply this Reflect to a vector.

inverse()

The inverse HomogeneousTransformation of this one.

angle

The angle of the reflection plane, θ.

cos_double_angle

cos(2θ).

sin_double_angle

sin(2θ).