Files
2026-05-27 11:23:23 +02:00

246 lines
8.2 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en" style="height:100%;margin:0;">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Rotation eines Würfels mit Matrizen</title>
<!-- Load main stylesheet asynchronously -->
<link rel="preload" as="style" href="/css/main.css" onload="this.rel='stylesheet'">
<link rel="preload" as="style" href="/css/prism.css" onload="this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/css/main.css"></noscript>
<link rel="icon" type="image/x-icon" href="/css/favicon/favicon.ico">
<!-- Local JS -->
<script src="/js/shared/theme.js"></script>
<script src="/js/post/download.js" defer></script>
<!-- Prism (code highlighting) -->
<script src="/js/post/prism.js" defer></script>
<!-- Dynamic MathJax loader -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const hasMath = /\$\$(.|[\r\n])*?\$\$|\$(?!\$)(.*?)\$/.test(document.body.innerHTML);
if (hasMath) {
const mj = document.createElement('script');
mj.src = '/package/js/mathjax.js';
mj.defer = true;
document.head.appendChild(mj);
}
});
</script>
<!-- Service worker registration -->
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/js/post/sw.js').catch(console.error);
}
</script>
</head>
<body>
<main class="container">
<h1 onclick="window.location.href=window.location.origin" style="cursor:pointer;display:flex;align-items:center;gap:8px;font-size:1.5em;margin:0;">
<img src="/css/icons/back.webp" width="32" height="32" alt="⬅" loading="lazy">
Rotation eines Würfels mit Matrizen <noscript>(Enable JavaScript!)</noscript>
</h1>
<img src="/css/icons/written.webp" width="32" height="32" alt="📄" loading="lazy" style="vertical-align:middle;margin-left:40px;cursor:pointer;" onclick="toggleDarkMode();" />
<div class="meta" style="display:inline;cursor:pointer;" onclick="toggleDarkMode();">
Written @Wed May 27 11:21:22 2026
</div>
<hr style="margin:10px 0;">
<div class="html-content">
<h1>Rotation eines Würfels mit Matrizen</h1>
<h2>1. Der Würfel im Raum</h2>
<p>Ein Würfel im Ursprung des Koordinatensystems (Mittelpunkt bei ( (0,0,0) )) und der Kantenlänge 2 besitzt die Eckpunkte:</p>
<div class="math-block">$$
\begin{aligned}
A &amp;= (1, 1, 1), &amp; B &amp;= (1, 1, -1), &amp; C &amp;= (1, -1, 1), \\
D &amp;= (1, -1, -1), &amp; E &amp;= (-1, 1, 1), &amp; F &amp;= (-1, 1, -1), \\
G &amp;= (-1, -1, 1), &amp; H &amp;= (-1, -1, -1)
\end{aligned}
$$</div>
<p>Jeder Punkt kann als Spaltenvektor dargestellt werden:</p>
<div class="math-block">$$
\mathbf{v} =
\begin{pmatrix}
x \\
y \\
z
\end{pmatrix}.
$$</div>
<p>Eine Drehung des Würfels im Raum kann mathematisch durch <strong>Multiplikation mit einer Rotationsmatrix</strong> beschrieben werden.</p>
<hr />
<h2>2. Rotationsmatrizen im 3D-Raum</h2>
<p>Eine Rotationsmatrix beschreibt eine Drehung um eine bestimmte Achse. Dabei bleibt die Länge der Vektoren unverändert, ebenso die Winkel zwischen ihnen.
Es gibt drei elementare Rotationen: um die <strong>x-Achse</strong>, die <strong>y-Achse</strong> und die <strong>z-Achse</strong>.</p>
<hr />
<h3>a) Rotation um die x-Achse</h3>
<div class="math-block">$$
\mathbf{v}' = R_x(\theta)\mathbf{v} =
\begin{pmatrix}
x \\
y \cos\theta - z \sin\theta \\
y \sin\theta + z \cos\theta
\end{pmatrix}
$$</div>
<p>Die x-Koordinate bleibt bei dieser Drehung unverändert. Der Punkt</p>
<div class="math-block">$$
\mathbf{v}' = R_x(\theta)\mathbf{v} =
\begin{pmatrix}
x \\
y \cos\theta - z \sin\theta \\
y \sin\theta + z \cos\theta
\end{pmatrix}
$$</div>
<hr />
<h3>b) Rotation um die y-Achse</h3>
<div class="math-block">$$
R_y(\theta) =
\begin{pmatrix}
\cos\theta &amp; 0 &amp; \sin\theta \\
0 &amp; 1 &amp; 0 \\
-\sin\theta &amp; 0 &amp; \cos\theta
\end{pmatrix}
$$</div>
<p>Dabei bleibt die y-Koordinate gleich, x und z verändern sich.</p>
<div class="math-block">$$
\mathbf{v}' = R_y(\theta)\mathbf{v} =
\begin{pmatrix}
x \cos\theta + z \sin\theta \\
y \\
- x \sin\theta + z \cos\theta
\end{pmatrix}
$$</div>
<hr />
<h3>c) Rotation um die z-Achse</h3>
<div class="math-block">$$
R_z(\theta) =
\begin{pmatrix}
\cos\theta &amp; -\sin\theta &amp; 0 \\
\sin\theta &amp; \cos\theta &amp; 0 \\
0 &amp; 0 &amp; 1
\end{pmatrix}
$$</div>
<p>Hier bleibt z unverändert, während x und y rotieren.</p>
<div class="math-block">$$
\mathbf{v}' = R_z(\theta)\mathbf{v} =
\begin{pmatrix}
x \cos\theta - y \sin\theta \\
x \sin\theta + y \cos\theta \\
z
\end{pmatrix}
$$</div>
<hr />
<h2>3. Kombination mehrerer Rotationen</h2>
<p>Oft wird ein Objekt nacheinander um mehrere Achsen gedreht.
Die Gesamtrotation ergibt sich durch <strong>Multiplikation der einzelnen Rotationsmatrizen</strong>.</p>
<p>Beispiel:</p>
<div class="math-block">$$
R_{\text{gesamt}} = R_x(\alpha) \cdot R_y(\beta) \cdot R_z(\gamma).
$$</div>
<p>Ein Punkt \(v\) wird dann abgebildet auf:</p>
<div class="math-block">$$
\mathbf{v}' = R_{\text{gesamt}}\mathbf{v}.
$$</div>
<p>Die Reihenfolge ist dabei wesentlich, da die Matrixmultiplikation <strong>nicht kommutativ</strong> ist:</p>
<div class="math-block">$$
R_x R_y \neq R_y R_x.
$$</div>
<p>Das bedeutet: Zuerst um die x-Achse und danach um die y-Achse zu drehen führt zu einem anderen Ergebnis, als die Reihenfolge umzukehren.</p>
<hr />
<h2>4. Matrixmultiplikation</h2>
<p>Die Multiplikation zweier Matrizen (A) und (B) (jeweils 3×3) ergibt eine neue Matrix (C = A \cdot B) mit den Einträgen:</p>
<div class="math-block">$$
c_{ij} = a_{i1}b_{1j} + a_{i2}b_{2j} + a_{i3}b_{3j}.
$$</div>
<p>Allgemein gilt:</p>
<ul>
<li>Jede Zeile von (A) wird mit jeder Spalte von (B) multipliziert.</li>
<li>Die Summe dieser Produkte ergibt das jeweilige Element von (C).</li>
</ul>
<p>So kann man Schritt für Schritt die Gesamtrotationsmatrix berechnen.</p>
<hr />
<h2>5. Beispiel für (\(\theta = 45^\circ\))</h2>
<p>Für den Winkel \(\theta = 45^\circ = \frac{\pi}{4}\) gilt:</p>
<div class="math-block">$$
\cos\theta = \sin\theta = \frac{\sqrt{2}}{2}.
$$</div>
<p>Damit lautet die Rotationsmatrix um die x-Achse:</p>
<div class="math-block">$$
R_x(45^\circ) =
\begin{pmatrix}
1 &amp; 0 &amp; 0 \\
0 &amp; \tfrac{\sqrt{2}}{2} &amp; -\tfrac{\sqrt{2}}{2} \\
0 &amp; \tfrac{\sqrt{2}}{2} &amp; \tfrac{\sqrt{2}}{2}
\end{pmatrix}
$$</div>
<p>Wendet man diese Matrix auf den Punkt \(\mathbf{A} = (1, 1, 1)\) an, ergibt sich:</p>
<div class="math-block">$$
\begin{aligned}
x' &amp;= 1, \\
y' &amp;= 1 \cdot \tfrac{\sqrt{2}}{2} - 1 \cdot \tfrac{\sqrt{2}}{2} = 0, \\
z' &amp;= 1 \cdot \tfrac{\sqrt{2}}{2} + 1 \cdot \tfrac{\sqrt{2}}{2} = \sqrt{2}.
\end{aligned}
$$</div>
<p>Der neue Punkt ist also:</p>
<div class="math-block">$$
\mathbf{A}' = (1, 0, \sqrt{2}).
$$</div>
<p>Der Punkt wurde damit um die x-Achse um 45° gedreht.</p>
<hr />
<h2>6. Zusammenfassung</h2>
<ul>
<li>Eine <strong>Rotationsmatrix</strong> beschreibt eine Drehung im Raum.</li>
<li>Die Länge eines Vektors bleibt bei der Rotation unverändert.</li>
<li>Es gibt drei Grundmatrizen: \(R_x(\theta)\), \(R_y(\theta)\) und \(R_z(\theta)\).</li>
<li>Durch <strong>Multiplikation</strong> kann man mehrere Drehungen kombinieren.</li>
<li>Die Reihenfolge der Rotationen ist <strong>nicht vertauschbar</strong>.</li>
<li>Bei \(45^\circ\) erscheinen häufig die Werte \(\frac{\sqrt{2}}{2}\) und \(\frac{1}{2}\).</li>
</ul>
</div>
</main>
<footer style="margin-top:auto;width:100%;">
<hr style="margin:10px 0;">
<img src="/css/icons/date.webp" width="16" height="16" alt="date" loading="lazy">
2026-05-27 11:21:22<br>
<img src="/css/icons/magnifier.webp" width="16" height="16" alt="Hash1" loading="lazy">
Hash 1 (<b>UTF-8</b>)<i>:dG9tYm95IHRvdWNhbg==</i><br>
<img src="/css/icons/magnifier.webp" width="16" height="16" alt="Hash2" loading="lazy">
Hash 2 (<b>Windows-1252</b>)<i>:ZmVtYm95IGZsYW1pbmdv</i><br>
<span style="display:inline-flex;align-items:center;gap:8px;">
<img src="/css/icons/save.webp" width="16" height="16" alt="Save" loading="lazy">
<a id="download-md">Download as Markdown</a>
<span style="border-left:1px solid #888;height:16px;"></span>
<img src="/css/icons/script.webp" width="16" height="16" alt="Script" loading="lazy">
<a id="download-html">Download as HTML</a>
</span>
</footer>
</body>
</html>