答案1
使用极坐标。
将 360 除以您的线段的数量并使用\foreach
,您甚至不需要手动计算角度。
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}
\node[draw, fill=cyan, ellipse, text width=4pt] (a) {};
\draw (a) -- +(0:4cm);
\draw (a) -- +(120:4cm);
\draw (a) -- +(240:4cm);
\end{tikzpicture}
You could also use a foreach: dividing 360 by the number or segments,
you don't even need to calculate your angles manually.
\begin{tikzpicture}
\node[draw, fill=cyan, ellipse, text width=4pt] (a) {};
\pgfmathsetmacro{\myangle}{360/3}
\foreach \i in {0,1,2}
\draw (a) -- +(\i*\myangle:4cm);
\end{tikzpicture}
\end{document}