答案1
具有标准图像模式。
\documentclass{article}
\usepackage{pict2e}
\makeatletter
% call \triad{000} or \triad{100} or \triad{011} or \triad{111}
\newcommand{\triad}[1]{\mathord{\,\triad@#1\,}}
% the main command
\newcommand{\triad@}[3]{%
\begingroup
\setlength{\unitlength}{0.19ex}%
\linethickness{\fontdimen8\textfont3}%
\begin{picture}(8,7)
\put(0,0){\circle*{2}}
\put(8,0){\circle*{2}}
\put(4,6.93){\circle*{2}}
\ifodd#1 \Line(0,0)(8,0)\fi
\ifodd#2 \Line(8,0)(4,6.93)\fi
\ifodd#3 \Line(0,0)(4,6.93)\fi
\end{picture}%
\endgroup
}
\makeatother
\begin{document}
Text $\triad{000}, \triad{100}, \triad{011}, \triad{111}$
$\triad{000}
\triad{001}
\triad{010}
\triad{011}
\triad{100}
\triad{101}
\triad{110}
\triad{111}$
\end{document}
参数\triad
是一个三位数字;1 表示绘制该线段,较低位表示底边,以逆时针旋转(参见下图中的所有内容)。
答案2
这是一个起点:
\documentclass{standalone}
\usepackage{tkz-euclide}
\tkzSetUpPoint[size=5,color=black,fill=black]
\tikzset{new/.style={color=black,line width=2pt}}
\begin{document}
\begin{tikzpicture}[scale=0.4]
\tkzDefPoints{0/0/A,1/0/B,0.5/0.866/C}
\tkzDrawPoints(A,B,C)
\end{tikzpicture},
\begin{tikzpicture}[scale=0.4]
\tkzDefPoints{0/0/A,1/0/B,0.5/0.866/C}
\tkzDrawPoints(A,B,C)
\tkzDrawSegment[line width=2pt](A,B)
\end{tikzpicture},
\begin{tikzpicture}[scale=0.4]
\tkzDefPoints{0/0/A,1/0/B,0.5/0.866/C}
\tkzDrawPoints(A,B,C)
\tkzDrawSegments[line width=2pt](A,C B,C)
\end{tikzpicture},
\begin{tikzpicture}[scale=0.4]
\tkzDefPoints{0/0/A,1/0/B,0.5/0.866/C}
\tkzDrawPoints(A,B,C)
\tkzDrawSegments[line width=2pt](A,C B,C A,B)
\end{tikzpicture}
\end{document}