我想画三条线,分别是 l、m 和 n,它们切割三角形。我的问题可能很简单,但我画不出来。事实上,我可以用 tkz-euclid 画三条线段。请帮帮我。另外,我们能用多少种不同的工具(如 tkz-euclid、pgfplot、asymptote)画出相同的图形?
梅威瑟:
\documentclass{article}
\usepackage{pgfplots}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){B}
\tkzDefPoint(10,0){C}
\tkzDrawSegment(B,C)
\tkzDefPoint(5,5){A}
\tkzDrawSegment(B,A)
\tkzDrawSegment(C,A)
\tkzLabelPoints[xshift=-10pt](B)
\tkzLabelPoints[xshift=-10pt](C)
\tkzLabelPoints[above](A)
\end{tikzpicture}
\end{document}
答案1
答案2
一个选项是TiKZ
\documentclass[tikz, border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw (0,0)--++(0:3cm)--++(120:3cm)--cycle;
\draw[<->] (0.5,2)--++(0:2cm);
\draw[<->] (0,1)--++(-60:2cm);
\draw[<->] (3,1)--++(-120:2cm);
\end{tikzpicture}
\end{document}
可能tkz-euclide
是
\documentclass{article}
\usepackage{tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){B}
\tkzDefPoint(10,0){C}
\tkzDefPoint(5,5){A}
\tkzDrawSegments(A,B B,C C,A)
\tkzLabelPoints[xshift=-10pt](B)
\tkzLabelPoints[xshift=-10pt](C)
\tkzLabelPoints[above](A)
\tkzDefShiftPoint[A](-3,-2){A1}
\tkzDefShiftPoint[A](3,-2){A2}
\tkzDrawVector[<->](A1,A2)
\tkzDefShiftPoint[B](0,2){B1}
\tkzDefShiftPoint[B](3,-1){B2}
\tkzDrawVector[<->](B1,B2)
\tkzDefShiftPoint[C](0,2){C1}
\tkzDefShiftPoint[C](-3,-1){C2}
\tkzDrawVector[<->](C1,C2)
\end{tikzpicture}
\end{document}