使用 tikz 绘制具有给定边和两个给定角的三角形(不是节点!)的最简单方法是什么?
答案1
通过谷歌搜索找到了一个例子解决 ASA 三角形。
\documentclass[tikz]{standalone}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
% Given
\def\myside{9}
\def\myanga{76}
\def\myangb{34}
%===============
\draw (0,0) -- (0:\myside)
let \n1={(180-(\myanga+\myangb))},
\n2={(\myside*(sin(\myanga)/sin(\n1))} in
-- (\myangb:\n2) -- cycle node{\n1,\n2};
\end{tikzpicture}
\end{document}
答案2
不像 percusse 的答案那么简单,但很容易理解。
\documentclass[tikz, border=2mm]{standalone}
\usetikzlibrary{intersections, angles, quotes}
\begin{document}
\begin{tikzpicture}
\draw coordinate[label=below:a] (a) --++(0:4cm) coordinate[label=below:b] (b);
\path[name path=ac] (a)--++(30:3cm);
\path[name path=bc] (b)--++(180-37:3cm);
\path [name intersections={of = ac and bc, by=c}];
\node[above] at (c) {c};
\draw[use as bounding box] (a)--(b)--(c)--cycle%
pic[draw, "$30^\circ$", angle eccentricity=1.6] {angle=b--a--c}
pic[draw, "$37^\circ$", angle eccentricity=1.6] {angle=c--b--a};
\end{tikzpicture}
\end{document}
答案3
作为评论来说它太长了,但作为打字练习来说它又太短了。
\documentclass[pstricks,border=24pt]{standalone}
\usepackage{pst-eucl}
\newpsstyle{nolabel}{PointName=none,PointSymbol=none}
\begin{document}
\begin{pspicture}(8,3)
\pstGeonode[PosAngle=-90]{A}(8,0){B}
\pstRotation[style=nolabel,RotAngle=30]{A}{B}
\pstRotation[style=nolabel,RotAngle=-37]{B}{A}
\pstInterLL[PosAngle=90]{A}{B'}{B}{A'}{C}
\pspolygon(A)(B)(C)
\psset{MarkAngleRadius=1.5}
\pstMarkAngle{B}{A}{C}{$30^\circ$}
\pstMarkAngle{C}{B}{A}{$37^\circ$}
\end{pspicture}
\end{document}