Tikz 对照表

线段

latex \draw (1,3)--(2,2)--(4,5); \draw[rounded corners] (1,3)--(2,2)--(4,5); \draw (1,3)--(2,2)--(4,5)--cycle;

objectivec polyline( [(1, 3), (2, 2), (4, 5)], rounded : true, circle : true, );

矩形, 正方形

latex \draw[rounded corners] (0,0) rectangle (4,2);

objectivec rectangle( (0, 0), (2, 2), rounded: 0.1, circle: true, );

椭圆,园,圆弧

latex \draw (1, 1) circle (1); \draw (1, 1) ellipse (2 and 1); \draw (1 ,1) arc (0:270:1); \draw (1 ,1) arc (0:270:2 and 1);

objectivec circle((1, 1), 1); ellipse((1, 1), 2, 1); circle((1, 1), 1, range: (0deg, 270deg)); ellipse((1, 1), 2, 1, range: (0deg, 270deg));

曲线

latex \draw (5,1) parabola bend (6,0) (7.414 ,2);

objectivec parabola( (5, 1), (6, 0), (7.414, 2), );

网格

latex \draw [step=20pt] (0,0) grid (3,2); \draw [help lines ,step=20pt] (4,0) grid (7,2);

latex \begin{tikzpicture} \filldraw [gray] (0,0) circle [radius=2pt] (1,1) circle [radius=2pt] (2,1) circle [radius=2pt] (2,0) circle [radius=2pt]; \draw (0,0) .. controls (1,1) and (2,1) .. (2,0); \end{tikzpicture}

Circle::from3points() Circle::from2points() Circle::frompointradius()

new Circle( (0, 0), 2, fill: true, fillColor: .gray, stroke: true, strokeColor: .black, strokeWidth: 1, controls: [(1, 1), (2, 1), (2, 0)], );