linear_algebra.src.transformations_2d¶
2D Transformations are regularly used in Linear Algebra.
I have added the codes for reflection, projection, scaling and rotation 2D matrices.
scaling(5) = [[5.0, 0.0], [0.0, 5.0]]
- rotation(45) = [[0.5253219888177297, -0.8509035245341184],
[0.8509035245341184, 0.5253219888177297]]
- projection(45) = [[0.27596319193541496, 0.446998331800279],
[0.446998331800279, 0.7240368080645851]]
- reflection(45) = [[0.05064397763545947, 0.893996663600558],
[0.893996663600558, 0.7018070490682369]]
Functions¶
|
|
|
|
|
|
|
Module Contents¶
- linear_algebra.src.transformations_2d.projection(angle: float) list[list[float]] ¶
>>> projection(45) [[0.27596319193541496, 0.446998331800279], [0.446998331800279, 0.7240368080645851]]
- linear_algebra.src.transformations_2d.reflection(angle: float) list[list[float]] ¶
>>> reflection(45) [[0.05064397763545947, 0.893996663600558], [0.893996663600558, 0.7018070490682369]]
- linear_algebra.src.transformations_2d.rotation(angle: float) list[list[float]] ¶
>>> rotation(45) [[0.5253219888177297, -0.8509035245341184], [0.8509035245341184, 0.5253219888177297]]
- linear_algebra.src.transformations_2d.scaling(scaling_factor: float) list[list[float]] ¶
>>> scaling(5) [[5.0, 0.0], [0.0, 5.0]]