赞
踩
要点:
- 可以用加减乘除的运算符号,提高易读性,比如2*60,而不是直接写120度;
- 画图设置颜色,比如color=gray;
- draw的时候,多个线段可以放在一个draw命令中,比如下面画OPn的时候,放在一个命令,这可以提高易读性
\begin{tikzpicture}[scale=1] \coordinate (O) at (0, 0); \coordinate (P1) at (1, 0); \coordinate (P2) at (60:1cm); \coordinate (P3) at (2*60:1cm); \coordinate (P4) at (3*60:1cm); \coordinate (P5) at (4*60:1cm); \coordinate (P6) at (5*60:1cm); \draw (P1)--(P2)--(P3)--(P4)--(P5)--(P6)--cycle; \draw [color=gray] (O)--(P1) (O)--(P2) (O)--(P3) (O)--(P4) (O)--(P5) (O)--(P6); \draw (O) node [below]{O}; \draw (P1) node [right]{P1}; \draw (P2) node [above right]{P2}; \draw (P3) node [above left]{P3}; \draw (P4) node [left]{P4}; \draw (P5) node [below left]{P5}; \draw (P6) node [below right]{P6}; \end{tikzpicture}
效果:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。