Tags: Web-App

M.2.G

Bemerkung

Grundlagen und Videos: Vektor: Transformation

Gegeben

../../../_images/M.2.G.png

Gegeben:

  • Das grüne \((x,y)\)-Bezugssystem.

  • Die Komponenten des roten Vektors \(\boldsymbol v\) im grünen \((x,y)\)-Bezugssystem:

    \[\begin{split}\begin{bmatrix} v_x \\ v_y \end{bmatrix} = \begin{bmatrix} 3 \\ 4 \end{bmatrix}\end{split}\]
  • Der Winkel \(\alpha = 10^\circ\), um den der rote Vektor \(\boldsymbol v'\) relativ zum roten Vektor \(\boldsymbol v\) gedreht ist.

Gesucht sind die Komponenten des gedrehten Vektors \(\boldsymbol v'\) im grünen \((x, y)\)-Bezugssystem:

\[\begin{split}\begin{bmatrix} v'_x \\ v'_y \end{bmatrix} = \begin{bmatrix} \ldots \\ \ldots \end{bmatrix}\end{split}\]

a) Drehmatrix

Aktive Transformation:

\[\begin{split}\begin{bmatrix} v'_x \\ v'_y \end{bmatrix} = \underbrace{ \begin{bmatrix} c_\alpha & -s_\alpha \\ s_\alpha & c_\alpha \end{bmatrix} }_{R_\alpha} \begin{bmatrix} v_x \\ v_y \end{bmatrix}\end{split}\]

Berechnen Sie die vier Einträge der Drehmatrix , und zwar gerundet auf \(0{,}01\):

\[\begin{split}R_\alpha &= \begin{bmatrix} c_\alpha & -s_\alpha \\ s_\alpha & c_\alpha \end{bmatrix} \\ &\stackrel{\scriptscriptstyle{0{,}01}}{\approx} \begin{bmatrix} \ldots & \ldots \\ \ldots & \ldots \end{bmatrix}\end{split}\]

Lösung

\[\begin{split}{R_\alpha} &= \begin{bmatrix} c_\alpha & -s_\alpha \\ s_\alpha & c_\alpha \end{bmatrix} \\ &= \begin{bmatrix} c_{10^\circ} & -s_{10^\circ} \\ s_{10^\circ} & c_{10^\circ} \end{bmatrix} \\ &\stackrel{\scriptscriptstyle{0{,}01}}{\approx} \begin{bmatrix} 0{,}98 & -0{,}17 \\ 0{,}17 & 0{,}98 \end{bmatrix}\end{split}\]

b) Komponenten des gedrehten Vektors

Berechnen Sie gerundet auf \(0{,}01\):

\[\begin{split}\begin{bmatrix} v'_x \\ v'_y \end{bmatrix} &\stackrel{\scriptscriptstyle{0{,}01}}{\approx} \begin{bmatrix} \ldots \\ \ldots \end{bmatrix}\end{split}\]

Zeigen Sie an einer Skizze, dass das Ergebnis plausibel ist.

Lösung

\[\begin{split}\begin{bmatrix} v'_x \\ v'_y \end{bmatrix} &= \begin{bmatrix} c_{10^\circ} & -s_{10^\circ} \\ s_{10^\circ} & c_{10^\circ} \end{bmatrix} \begin{bmatrix} v_x \\ v_y \end{bmatrix} \\ &\stackrel{\scriptscriptstyle{0{,}01}}{\approx} \begin{bmatrix} 2{,}26 \\ 4{,}46 \end{bmatrix}\end{split}\]

Plausibilitätskontrolle:

  • Das Bezugssystem zeichnen.

  • Die beiden Vektoren zeichnen.

  • Die Komponenten ablesen.

c) Infinitesimale Drehung

../../../_images/M.2.G.png

Die Komponenten des gedrehten Vektors sind (abhängig von \(\alpha\)):

\[\begin{split}\begin{bmatrix} v'_x \\ v'_y \end{bmatrix} = \underbrace{ \begin{bmatrix} c_\alpha & -s_\alpha \\ s_\alpha & c_\alpha \end{bmatrix} }_{R_\alpha} \begin{bmatrix} 3 \\ 4 \end{bmatrix}\end{split}\]

Für betragsmäßig kleine Winkel \(\alpha\) gilt: \(c_\alpha\approx 1\) und \(s_\alpha\approx \alpha\). Falls der Vektor \(\boldsymbol v'\) nur sehr wenig (infinitesimal) relativ zum Vektor \(\boldsymbol v\) gedreht ist, gilt daher näherungsweise:

\[\begin{split}\begin{bmatrix} v'_{x} \\ v'_{y} \end{bmatrix} &= \underbrace{ \begin{bmatrix} 1 & -\alpha \\ \alpha & 1 \end{bmatrix} }_{\tilde R_\alpha} \begin{bmatrix} 3 \\ 4 \end{bmatrix}\end{split}\]

Füllen Sie folgende Tabelle mit Werten gerundet auf Rundestellenwert \(0{,}0001\).

Werte gerundet auf Rundestellenwert 0,0001

\(\alpha\)

\(R_\alpha=\begin{bmatrix} c_\alpha & -s_\alpha \\ s_\alpha & c_\alpha \end{bmatrix}\)

\(\tilde R_\alpha=\begin{bmatrix} 1 & -\alpha \\ \alpha & 1 \end{bmatrix}\)

\(R_\alpha \begin{bmatrix} 3 \\ 4 \end{bmatrix}\)

\(\tilde R_\alpha \begin{bmatrix} 3 \\ 4 \end{bmatrix}\)

\(1^\circ\)

\(\begin{bmatrix}0{,}9998 & -0{,}0175\\0{,}0175 & 0{,}9998\end{bmatrix}\)

\(\ldots\)

\(\begin{bmatrix}2{,}9297\\4{,}0517\end{bmatrix}\)

\(\ldots\)

\(3^\circ\)

\(\ldots\)

\(\ldots\)

\(\ldots\)

\(\ldots\)

\(-3^\circ\)

\(\ldots\)

\(\ldots\)

\(\ldots\)

\(\ldots\)

\(5^\circ\)

\(\ldots\)

\(\ldots\)

\(\ldots\)

\(\ldots\)

Lösung

Werte gerundet auf Rundestellenwert 0,0001

\(\alpha\)

\(R_\alpha=\begin{bmatrix} c_\alpha & -s_\alpha \\ s_\alpha & c_\alpha \end{bmatrix}\)

\(\tilde R_\alpha=\begin{bmatrix} 1 & -\alpha \\ \alpha & 1 \end{bmatrix}\)

\(R_\alpha \begin{bmatrix} 3 \\ 4 \end{bmatrix}\)

\(\tilde R_\alpha \begin{bmatrix} 3 \\ 4 \end{bmatrix}\)

\(1^\circ\)

\(\begin{bmatrix}0{,}9998 & -0{,}0175\\0{,}0175 & 0{,}9998\end{bmatrix}\)

\(\begin{bmatrix}1{,}0 & -0{,}0175\\0{,}0175 & 1{,}0\end{bmatrix}\)

\(\begin{bmatrix}2{,}9297\\4{,}0517\end{bmatrix}\)

\(\begin{bmatrix}2{,}9302\\4{,}0524\end{bmatrix}\)

\(3^\circ\)

\(\begin{bmatrix}0{,}9986 & -0{,}0523\\0{,}0523 & 0{,}9986\end{bmatrix}\)

\(\begin{bmatrix}1{,}0 & -0{,}0524\\0{,}0524 & 1{,}0\end{bmatrix}\)

\(\begin{bmatrix}2{,}7865\\4{,}1515\end{bmatrix}\)

\(\begin{bmatrix}2{,}7906\\4{,}1571\end{bmatrix}\)

\(-3^\circ\)

\(\begin{bmatrix}0{,}9986 & 0{,}0523\\-0{,}0523 & 0{,}9986\end{bmatrix}\)

\(\begin{bmatrix}1{,}0 & 0{,}0524\\-0{,}0524 & 1{,}0\end{bmatrix}\)

\(\begin{bmatrix}3{,}2052\\3{,}8375\end{bmatrix}\)

\(\begin{bmatrix}3{,}2094\\3{,}8429\end{bmatrix}\)

\(5^\circ\)

\(\begin{bmatrix}0{,}9962 & -0{,}0872\\0{,}0872 & 0{,}9962\end{bmatrix}\)

\(\begin{bmatrix}1{,}0 & -0{,}0873\\0{,}0873 & 1{,}0\end{bmatrix}\)

\(\begin{bmatrix}2{,}64\\4{,}2462\end{bmatrix}\)

\(\begin{bmatrix}2{,}6509\\4{,}2618\end{bmatrix}\)

d) Web-App

Vector Transformation

Anleitung

\((v'_x, v'_y)\) für einen gegebenen Winkel \(\alpha\) am Kreis ablesen:

  • Den gegebenen Winkel \(\varphi = - \alpha\) am Schieberegler einstellen. Falls nötig: Ganzzahliges Vielfaches von \(360^\circ\) addieren, sodass der Winkel einstellbar ist.

  • \((v_{\bar x} , v_{\bar x})\) am Kreis ablesen als die Koordinaten des Punkts auf dem Kreis.

Beispiele:

\(\alpha\)

Vektor-Drehung

Einstellung \(\varphi\) in °

\(10^\circ\)

↺ 10°

-10

\(-10^\circ\)

↻ 10°

10

\(370^\circ\)

↺ 370°

-10

\(190^\circ\)

↺ 190°

170

e) Weitere Beispiele

Werte gerundet auf Rundestellenwert 0,01

\(\alpha\)

\(\begin{bmatrix} c_\alpha & -s_\alpha \\ s_\alpha & c_\alpha \end{bmatrix}\)

\(\begin{bmatrix} v'_x \\ v'_y \end{bmatrix}\)

\(10^\circ\)

\(\begin{bmatrix} 0{,}98 & -0{,}17 \\ 0{,}17 & 0{,}98 \end{bmatrix}\)

\(\begin{bmatrix} 2{,}26 \\ 4{,}46 \end{bmatrix}\)

\(90^\circ\)

\(\begin{bmatrix} 0{,}0 & -1{,}0 \\ 1{,}0 & 0{,}0 \end{bmatrix}\)

\(\begin{bmatrix} -4{,}0 \\ 3{,}0 \end{bmatrix}\)

\(180^\circ\)

\(\begin{bmatrix} -1{,}0 & 0{,}0 \\ 0{,}0 & -1{,}0 \end{bmatrix}\)

\(\begin{bmatrix} -3{,}0 \\ -4{,}0 \end{bmatrix}\)

\(-170^\circ\)

\(\begin{bmatrix} -0{,}98 & 0{,}17 \\ -0{,}17 & -0{,}98 \end{bmatrix}\)

\(\begin{bmatrix} -2{,}26 \\ -4{,}46 \end{bmatrix}\)

../../../_images/M.2.G_1.png

Negative Winkel

  • Anstatt \(5\,\mathrm{m}\) (Meter) nach hinten zu gehen, kann man gleichbedeutend \(-5\,\mathrm{m}\) nach vorne gehen.

  • Anstatt \(-10\,\mathrm{m}\) (Meter) nach rechts abzumessen, kann man gleichbedeutend \(+10\,\mathrm{m}\) nach links abmessen.

  • Anstatt \(-170^\circ\) entgegen dem Uhrzeigersinn abzumessen, kann man gleichbedeutend \(+ 170^\circ\) im Uhrzeigersinn abmessen.

SymPy

Source Code eines Programms dazu:

from sympy.physics.units import *
from sympy import *

# Units:
(mm, cm)  =  ( m/1000, m/100 )
Newton    =  kg*m/s**2
kN        =  10**3*Newton
Pa        =  Newton/m**2
MPa       =  10**6*Pa
GPa       =  10**9*Pa
deg       =  pi/180
half      =  S(1)/2

# Rounding:
def iso_round(x, pv):
    try:
        x = float(x)
        tmp = round(x, pv)
    except TypeError:
        from functools import partial
        func = partial(round, ndigits = pv)
        tmp = x.applyfunc(func)
    return tmp

prec = 1

v = Matrix([3, 4])

a = 10 *deg

lin = True
lin = False

# End of User Input.

pprint("\nv:")
pprint(v)

pprint("\nφ / deg:")
tmp = a / deg
pprint(tmp)

if lin:
    pprint("\nInfinitesimal Rotation.")
    R = Matrix([[1, -a],[a, 1]])
else:
    pprint("\nFinite Rotation.")
    c, s = cos(a), sin(a)
    R = Matrix([[c, -s],[s, c]])

# pprint("\nR:")
# tmp = R
# tmp = iso_round(tmp,prec)
# pprint(tmp)

pprint("\n(v'x, v'y):")
vp = R*v
tmp = vp
tmp = iso_round(tmp,prec)
pprint(tmp)

Programm ausführen? Dazu:

  1. Copy: Source Code in die Zwischenablage kopieren.

  2. Paste: Source Code ins Eingabefeld hinter [ ]: einfügen.

  3. Play: Knopf ▶ drücken.