![平均能量损失](https://linux22.com/image/345884/%E5%B9%B3%E5%9D%87%E8%83%BD%E9%87%8F%E6%8D%9F%E5%A4%B1.png)
大家好,我需要一点帮助。我需要使用 tikZ 制作以下梯形。
到目前为止我有这个:
\documentclass[tikz]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[line width = 1.5pt]
\node (a)
[shape=trapezium,
trapezium left angle=82,
trapezium right angle=41,
draw,
minimum height=2.1*1cm] {};
\node [below right] at (a.top left corner) {$\alpha$};
\node [below left] at (a.top right corner) {$\beta$};
\node [above right] at ([xshift=.1cm]a.bottom left corner) {82};
\node [above left] at ([xshift=-.4cm]a.bottom right corner) {42};
\node(v1) at (-1,1){};
\draw(v1) -- (-2,1);
\end{tikzpicture}
\end{document}
你能帮我么
答案1
有一个库可以实现这一点。该angles
库提供了一个适当地称为的内置pic
类型angle
,如果您定义三个坐标(A)
(B)
和(C)
,其中B
是顶点,并且发出将在和线\pic{angle}
之间绘制一条角度线。或者您可以说,其中s 是先前定义的坐标。如果您还希望像示例图片中那样绘制 //,您可以为其定义一个新类型。A--B
B--C
\pic{angle=C1--C2--C3}
C
pic
平均能量损失
\documentclass[tikz]{standalone}
\usetikzlibrary{shapes.geometric, angles, quotes}
\begin{document}
\begin{tikzpicture}[draw angle/.style args={#1--#2--#3 with #4}{%
insert path={%
foreach \i/\j in {#1/A,#2/B,#3/C}{(\i) coordinate (\j)}%
pic[angle style, #4]{angle}}
},
angle style/.style={draw, thin},
bars/.pic={\draw (80:-0.5) -- (80:0.5) ++(0:.1) -- ++(80:-1);},
line width = 1.5pt]
\node[draw,
shape=trapezium,
trapezium left angle=82,
trapezium right angle=41,
minimum height=2.1*1cm] (a) {};
\path (a.bottom left corner) coordinate (T1)
(a.top left corner) coordinate (T2)
(a.top right corner) coordinate (T3)
(a.bottom right corner) coordinate (T4);
\draw[draw angle={T4--T1--T2 with {angle radius=2.4em, "$82^\circ$"}},
draw angle={T1--T2--T3 with "$\alpha$"},
draw angle={T2--T3--T4 with "$\beta$"},
draw angle={T3--T4--T1 with {angle radius=3.2em, angle eccentricity=0.7, "$41^\circ$"}}];
\draw ([shift={(.5*\pgflinewidth,.5*\pgflinewidth)}]T1) ++(-1,0) coordinate (tmp) -- pic[pos=.3,thin, scale=0.5]{bars}([shift={(.5*\pgflinewidth,.5*\pgflinewidth)}]T1);
\draw ([shift={(.5*\pgflinewidth,-.5*\pgflinewidth)}]tmp|-T2) -- pic[pos=.3,thin, scale=0.5]{bars} ([shift={(.5*\pgflinewidth,-.5*\pgflinewidth)}]T2);
\end{tikzpicture}
\end{document}