Advertisement
Guest User

Untitled

a guest
Apr 7th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 3.26 KB | None | 0 0
  1. \documentclass{standalone}
  2. \usepackage{tikz}
  3. \usetikzlibrary{calc}
  4. \begin{document}
  5. \begin{tikzpicture}
  6. %zuerst ein paar styles definieren
  7. [
  8.    help/.style={->,color=gray,very thin},
  9.    nodehelp/.style={fill=white,above=1pt,midway},
  10.    imp/.style={->,very thick},
  11.    pro/.style={color=green!50!blue},
  12.    pronode/.style={anchor=south east, fill=white, midway}]
  13. %Basiskoordinaten
  14. \coordinate (null) at (0cm,0cm);
  15. \coordinate (vec) at (-3cm,4cm);
  16. %path für let operator
  17. \path
  18.  let
  19.     \p1 = (vec),
  20.     \n1 = {veclen(\x1,\y1)}
  21.  in
  22.    coordinate (shift) at (\n1,0cm);
  23. %abgeleitete koordinaten
  24. \coordinate (mirror) at ($(vec)-(shift)$);
  25. \coordinate (omirror) at ($(vec)+(shift)$);
  26. \coordinate (mirpro) at ($(null)!(vec)!(mirror)$);
  27. \coordinate (omirpro) at ($(null)!(vec)!(omirror)$);
  28. \coordinate (arc) at ($ 0.1*(vec)-0.1*(omirpro)$);
  29. %Koordinatensystem zeichnen
  30. \draw[->,shorten <=1cm,shorten >=1cm] (-10cm,0cm)--(10cm,0cm);
  31. \draw[->] (0cm,-1.5cm) -- (0cm,6cm)
  32.     node[anchor=south,at end] {\huge{Householder Spiegelung}};
  33. %hilfslinien unauffällig machen
  34. \draw[color=gray, very thin] (shift)
  35.  let
  36.     \p1 = (shift),
  37.     \n1 = {veclen(\x1,\y1)}
  38. in
  39.     arc(0:180:\n1);
  40. \draw[help] (shift) -- (omirror);
  41. \draw[help] (vec) -- (mirror)
  42.    node[nodehelp] {${}-\|v\|\cdot  e_1$};
  43. \draw[help] (vec) -- (omirror)
  44.    node[nodehelp] {$\|v\|\cdot e_1$};
  45. \draw[help] (null) -- ($ 1.1*(mirror)$)
  46.    node[anchor=south] {\large{Spiegelebene}};
  47. \draw (vec) -- (omirpro);
  48. \draw ($(omirpro) + (arc)$)
  49. let
  50.    \p1 = (arc),
  51.    \n1 = {veclen(\x1,\y1)},
  52.    \n2 = {atan2(\x1,\y1)}
  53. in
  54.    arc(\n2:\n2+90:\n1);
  55. \fill[color=black] (omirpro)
  56. let
  57.    \p1 = ($0.5*(arc)$),
  58.    \n1 = {veclen(\x1,\y1)},
  59.    \n2 = {0.125*veclen(\x1,\y1)},
  60.    \n3 = {atan2(\x1,\y1)}
  61. in
  62.  ++(\n3+45:\n1)
  63.    circle (\n2);
  64. \draw ($(mirpro) + (arc) $)
  65. let
  66.    \p1 = (arc),
  67.    \n1 = {veclen(\x1,\y1)},
  68.    \n2 = {atan2(\x1,\y1)}
  69. in
  70.    arc(\n2:\n2+90:\n1);
  71. \fill[color=black] (mirpro)
  72. let
  73.    \p1 = ($0.5*(arc)$),
  74.    \n1 = {veclen(\x1,\y1)},
  75.    \n2 = {0.125*veclen(\x1,\y1)},
  76.    \n3 = {atan2(\x1,\y1)}
  77. in
  78.  ++ (\n3+45:\n1)
  79.    circle (\n2);
  80. \draw[color=blue!50!green, |<->|] ($(null)-0.01*(mirror)$) -- ($(omirpro)- 0.01*(mirror)$)
  81.    node[anchor=north west, fill=white, midway] {$\alpha:=\langle \tilde{\omega}, v \rangle$};
  82. %wichtige linien, zum schluss zeichnen
  83. \draw[imp,color=blue] (null) -- (vec)
  84.     node[anchor=south west,midway] {$v$};
  85. \draw[imp,color=green] (null) --(mirror)
  86.    node[anchor=north east, near end] {$v-\|v\| \cdot e_1$};
  87. \draw[imp,color=green] (null) -- (omirror)
  88.    node[anchor=north west,fill=white, near end,align=center] {$\omega:=v+\|v\| \cdot e_1$\\
  89.                                                    $\tilde{\omega}=\frac{\omega}{\|\omega\|}$};
  90. \draw[imp,pro] (vec) -- (mirpro)
  91.    node[pronode] {$-\alpha \tilde{\omega}$};
  92. \draw[imp,pro, ] (mirpro) -- ($-1*(shift)$)
  93.    node[pronode] {$-\alpha \tilde{\omega}$};%there is a small place between the lines we draw it
  94. \draw[pro, very thick,shorten >= 4mm] (vec) -- ($-1*(shift)$); %seperate to have a consistent node placing
  95. \draw[imp,color=blue!40!green] (null)-- ($ -1*(shift)$)
  96.     node[fill=white, below=3pt,at end] {$Q_\omega \cdot v=-\|v\|\cdot e_1$};
  97. \end{tikzpicture}
  98. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement