Version 2
This commit is contained in:
parent
f5afa78ff9
commit
23e7c63d11
22
README.md
22
README.md
@ -7,6 +7,7 @@ This Package contains a few fundamental function which can be used for **matrice
|
||||
- matmul function
|
||||
- transpose function
|
||||
- rot_2D function
|
||||
- rot_3D function
|
||||
|
||||
## matmul function:
|
||||
|
||||
@ -89,4 +90,25 @@ rotation matrix for 90°:
|
||||
6.12323e-17 -1
|
||||
1 6.12323e-17
|
||||
----------- ------------
|
||||
```
|
||||
|
||||
## rot_3D function:
|
||||
This function calculates the rotation matrix for one 3D axis (x, y, z) for a certain angle.
|
||||
|
||||
**Example:**
|
||||
```
|
||||
theta = math.pi / 2
|
||||
R = rot_3D(theta, "y")
|
||||
|
||||
print("rotation matrix for 90° on the y axis:")
|
||||
print(tabulate(R))
|
||||
```
|
||||
**Result:**
|
||||
```
|
||||
rotation matrix for 90° on the y axis:
|
||||
------------ - -----------
|
||||
6.12323e-17 0 1
|
||||
0 1 0
|
||||
-1 0 6.12323e-17
|
||||
------------ - -----------
|
||||
```
|
||||
@ -1 +1 @@
|
||||
from .compute import matmul, transpose, rot_2D
|
||||
from .compute import matmul, transpose, rot_2D, rot_3D
|
||||
|
||||
@ -127,3 +127,9 @@ if __name__ == "__main__":
|
||||
print("Matrix A:")
|
||||
print(tabulate(matrix_a))
|
||||
|
||||
theta = math.pi / 2
|
||||
R = rot_3D(theta, "y")
|
||||
|
||||
print("rotation matrix for 90° on the y axis:")
|
||||
print(tabulate(R))
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "matrixmania_benkertmo99686"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
description = "MatrixMania: Simple linear algebra functions for teaching (matmul, transpose, rot_2D)."
|
||||
authors = [
|
||||
{ name="Mona Benkert", email="benkertmo99686@th-nuernberg.de" }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user