| Ich möchte bei folgendem Beispiel ein Quadrat über der linken "schiefen" Seiten des Dreiecks haben. Open in Online-Editor \documentclass[border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (6,0); \path[name path=a] (B) -- ++(150:5.5); \path[name path=b] (A) -- ++(60:3.5); \path[name intersections={of=a and b}] (intersection-1) coordinate (C); \draw (A) -- (B) --(C) -- (A); \end{tikzpicture} \end{document} Ich hab keine Idee, wie man das umsetzt. Ich hab gefunden, dass man mit  | 
| Lade einfach die TikZ Bibliothek  Open in Online-Editor ($<coordinate>!<faktor>!<winkel>:<second coordinate>$) Damit ist eine Koordinate gemeint, die  Das Quadrat kannst Du entsprechend mit Open in Online-Editor \draw[red,very thick,dashed](A)--($(A)!1!90:(C)$)--($(C)!1!-90:(A)$)--(C)--cycle; zeichnen. 
 Code: Open in Online-Editor \documentclass[border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (6,0); \path[name path=a] (B) -- ++(150:5.5); \path[name path=b] (A) -- ++(60:3.5); \path[name intersections={of=a and b}] (intersection-1) coordinate (C); \draw (A) -- (B) --(C) -- (A); \draw[red,very thick,dashed] (A)--($(A)!1!90:(C)$)--($(C)!1!-90:(A)$)--(C)--cycle; \end{tikzpicture} \end{document} Geht das vll. auch mit einem  
                
                
                
                
                
                (28 Feb '15, 21:23)
                cis
                
             Wenn schon ein Node, dann tut es auch ein einfacher quadratischer? 
                
                
                
                
                
                (28 Feb '15, 21:59)
                esdd
                
             Perfekt! Danke! 
                
                
                
                
                
                (01 Mär '15, 18:45)
                tom75
                
             Das ist schon die beste Lösung -  im TikZ-Handbuch, Kap.  
                
                
                
                
                
                (02 Mär '15, 17:07)
                cis
                
             | 
| Auf Anregung von @cis ist hier noch eine Alternative, bei der der Abstand zwischen den Punkten  Open in Online-Editor \documentclass[border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (6,0); \path[name path=a] (B) -- ++(150:5.5); \path[name path=b] (A) -- ++(60:3.5); \path[name intersections={of=a and b}] (intersection-1) coordinate (C); \draw (A) -- (B) --(C) -- (A); \path let \p1=($(C)-(A)$), \n1={veclen(\x1,\y1)} in (A)node[draw,blue,dashed,very thick, minimum size=\n1, outer sep=0pt,inner sep=0pt, anchor=south west, rotate=60 ]{}; \end{tikzpicture} \end{document} 
 Da @cis sich das Quadrat als Dekoration der Strecke vorstellt, ist hier ein noch etwas umständlicherer Vorschlag, bei dem zusätzlich die  Open in Online-Editor \documentclass[border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \usetikzlibrary{calc} \usetikzlibrary{decorations.shapes} \tikzset{ decorate with square/.style={ decorate, outer sep=0pt, decoration={ shape backgrounds, shape=rectangle, anchor=south, shape size=#1, shape evenly spread=1 } } } \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (6,0); \path[name path=a] (B) -- ++(150:5.5); \path[name path=b] (A) -- ++(60:3.5); \path[name intersections={of=a and b}] (intersection-1) coordinate (C); \draw (A) -- (B) --(C) -- (A); \path let \p1=($(C)-(A)$), \n1={veclen(\x1,\y1)} in [draw=green,dashed,very thick,decorate with square=\n1] (A)--(C); \end{tikzpicture} \end{document} Ergebnis: 
 Und da @cis unbedingt lieber ein  Open in Online-Editor \documentclass[border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \usetikzlibrary{calc} \usetikzlibrary{decorations.shapes,shapes.geometric} \tikzset{ decorate with square/.style={ decorate, outer sep=0pt, decoration={ shape backgrounds, shape=regular polygon, anchor=south, shape size=#1, shape evenly spread=1 }, regular polygon sides=4 } } \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (6,0); \path[name path=a] (B) -- ++(150:5.5); \path[name path=b] (A) -- ++(60:3.5); \path[name intersections={of=a and b}] (intersection-1) coordinate (C); \draw (A) -- (B) --(C) -- (A); \path let \p1=($(C)-(A)$), \n1={veclen(\x1,\y1)} in [draw=orange,dashed,very thick,decorate with square=\n1] (A)--(C); \end{tikzpicture} \end{document} 
 Ich dachte an sowas wie  
                
                
                
                
                
                (01 Mär '15, 20:38)
                cis
                
             @cis Ich habe jetzt auch noch eine Variante mit  
                
                
                
                
                
                (01 Mär '15, 23:32)
                esdd
                
             Ich finde die Methode gar nicht so schlecht, bloß hat die decoration-lib scheints keinen einfachen Positionierungsmechanismus.
PS: Ah und ich sehe gerade noch, das ist immer noch kein " 
                
                
                
                
                
                (02 Mär '15, 13:32)
                cis
                
             @cis Ich habe Dir jetzt auch noch eine Version mit  
                
                
                
                
                
                (02 Mär '15, 14:18)
                esdd
                
             Ja so ist das gut, kapiert bloß niemand mehr :D 
                
                
                
                
                
                (02 Mär '15, 14:39)
                cis
                
             | 
 
			



