diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index c6981af..21f55b9 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,18 +4,10 @@
-
-
-
-
-
-
-
-
+
+
-
-
-
+
@@ -44,6 +36,9 @@
-
+
@@ -92,6 +87,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -111,6 +140,8 @@
+
+
@@ -155,7 +186,15 @@
1792077022970
-
+
+
+ 1792679838169
+
+
+
+ 1792679838169
+
+
@@ -176,6 +215,7 @@
-
+
+
\ No newline at end of file
diff --git a/src/matrixmania/compute.py b/src/matrixmania/compute.py
index 55324c6..b018ccc 100644
--- a/src/matrixmania/compute.py
+++ b/src/matrixmania/compute.py
@@ -189,3 +189,11 @@ def rot_3d(angle: float, axis: str) -> list[list[float]]:
return [[cosine, 0.0, sine], [0.0, 1.0, 0.0], [-sine, 0.0, cosine]]
return [[cosine, -sine, 0.0], [sine, cosine, 0.0], [0.0, 0.0, 1.0]]
+
+def project_ortho(point: tuple[float, float, float], scale: float = 1) -> tuple[float, float] :
+ """Ignoriert Z-Koordinate und skaliert mit scale multiplier"""
+ new_point : tuple[float, float] = (
+ point[0] * scale,
+ point[1] * scale
+ )
+ return new_point
diff --git a/test/test_matrixmania/test_projection.py b/test/test_matrixmania/test_projection.py
new file mode 100644
index 0000000..4f8d8bb
--- /dev/null
+++ b/test/test_matrixmania/test_projection.py
@@ -0,0 +1,26 @@
+from matrixmania.compute import project_ortho
+
+def test_project_ortho_no_scale() -> None:
+ """Prüft die Funktion project_ortho, ob richtige Form zurückgegeben wird. Ohne scale Parameter"""
+
+ #Arrange: Es wird mit dem Tupel (1,2,3) geprüft, erwartet wird das Tupel (1,2)
+
+ test_tupel = (1,2,3)
+ expected_tupel = (1,2)
+
+ #Act und Assert: Funktion mit Parameter test_tuple wird mit expected_tupel verglichen
+
+ assert project_ortho(test_tupel) == expected_tupel
+
+def test_project_ortho_scale() -> None:
+ """Prüft die Funktion project_ortho, ob richtige Form zurückgegeben wird. Mit scale Parameter"""
+
+ # Arrange: Es wird mit dem Tupel (1,2,3) geprüft, der scale parameter wird auf 10 gesetzt. Erwartet wird das Tupel (10,20)
+
+ test_tupel = (1,2,3)
+ scale = 10
+ expected_tupel = (10,20)
+
+ # Act und Assert: Funktion mit Parameter test_tuple wird mit expected_tupel verglichen
+
+ assert project_ortho(test_tupel,scale) == expected_tupel
\ No newline at end of file