答案1
这是一个相对简单的问题。你只需要稍微熟悉一下 TikZ 包。它有非常详细的文档(因此很庞大),但对于初学者来说,阅读第一部分就足够了教程或者TikZ 的简单介绍并查看其使用示例示例
使用 TikZ 库angles
和图片比例:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{angles}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[
myangles/.style = {draw,
angle radius = #1 mm},
myangles/.default = 4
]
%%%% first triangle
\draw (0,0) coordinate[label= left:A] (a) --
(3,0) coordinate[label=right:B] (b) --
(1,2) coordinate[label=above:C] (c) -- cycle;
\pic [myangles] {angle = b--a--c};
\pic [myangles] {angle = a--c--b};
\pic [myangles=5] {angle = a--c--b};
\pic [myangles] {angle = c--b--a};
\pic [myangles=5] {angle = c--b--a};
\pic [myangles=6] {angle = c--b--a};
%%%% second triangle: scaled of the first
\begin{scope}[xshift=44mm, scale=2]
\draw (0,0) coordinate[label= left:D] (a) --
(3,0) coordinate[label=right:E] (b) --
(1,2) coordinate[label=above:F] (c) -- cycle;
\pic [myangles] {angle = b--a--c};
\pic [myangles] {angle = a--c--b};
\pic [myangles=5] {angle = a--c--b};
\pic [myangles] {angle = c--b--a};
\pic [myangles=5] {angle = c--b--a};
\pic [myangles=6] {angle = c--b--a};
\end{scope}
\end{tikzpicture}
\caption{Triangles in Tikz}
\end{figure}
\end{document}
答案2
一个解决方案是tkz-euclide
:
\documentclass{article}
\usepackage{tkz-euclide}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[double distance=3pt]
\clip(-.5,-.5) rectangle (12,5);
\tkzDefPoints{-5/0/S,0/0/A,3/0/B,1/2/C}
\tkzDefPointsBy[homothety=center S ratio 2](A,B,C){D,E,F}
\tkzDrawPolygon(A,B,C)
\tkzDrawPolygon(D,E,F)
\tkzLabelPoints[left](A,D)
\tkzLabelPoints[right](B,E)
\tkzLabelPoints[above](C,F)
\tkzMarkAngle[size=5mm,mark=|,arc=l](B,A,C)
\tkzMarkAngle[size=5mm,mark=none,arc=l](C,B,A)
\tkzMarkAngle[size=5mm,mark=s,arc=l](A,C,B)
\tkzMarkAngle[size=10mm,mark=|,arc=l](E,D,F)
\tkzMarkAngle[size=10mm,mark=none,arc=l](F,E,D)
\tkzMarkAngle[size=10mm,mark=s,arc=l](D,F,E)
\end{tikzpicture}
\caption{Triangles in Tikz}
\end{figure}
\end{document}
答案3
这是一些可以开始的事情。
如何正确制作直角标记这里。
\documentclass[border=3mm]{article}
\usepackage{tikz}
\usepackage{caption}
\newcommand*{\rechterWinkel}[3]{% #1 = point, #2 = start angle, #3 = radius
\draw[shift={(#2:#3)}] (#1) arc[start angle=#2, delta angle=90, radius = #3];
}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}
\draw (0,0) -- (1,1) -- (3,0) -- cycle;
\node[xshift=-2mm](A) at (0,0) {A};
\node[yshift=2mm](C) at (1,1) {C};
\node[xshift=2mm](B) at (3,0) {B};
\rechterWinkel{0.2,0}{1}{.2} %A
\rechterWinkel{1,1.05}{-127}{.2} %B
\rechterWinkel{1,1.04}{-127}{.25} %B
\rechterWinkel{2.8,0}{90}{.1} %C
\rechterWinkel{2.75,0}{90}{.128} %C
\rechterWinkel{2.7,0}{90}{.155} %C
\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) -- (2,2) -- (5,0) -- cycle;
\node[xshift=-2mm](D) at (0,0) {D};
\node[yshift=2mm](F) at (2,2) {F};
\node[xshift=2mm](E) at (5,0) {E};
\end{tikzpicture}
\caption{Triangle in Tikz}
\end{figure}
\end{document}