免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 发帖
真的随机起来,每次画的会不一样,你的圆怎么放?

TOP

像你那图,就自己随意手动指定一些点然后把它们 smooth cycle 地 plot 起来就好了,像这样
\newcommand\dian[4]{\coordinate[label={#4:$#3$}] (#2) at (#1);}
\tikz{
\dian{0,0}OO{-90}
\dian{-160:2}AA{180}
\dian{20:2}BB{0}
\dian{-0.1,1.2}CC{90}
\foreach \i in {A,B,C,O} \fill[red] (\i) circle (1pt);
\draw (O) circle (2);
\draw plot[smooth cycle] coordinates{
(B) (50:1.2) (C) (150:1.3) (A) (-120:0.8) (-30:1.5)};
}
捕获.PNG
$\href{https://kuingggg.github.io/}{\text{About Me}}$

TOP

回复 4# abababa

稍微调整到看起来没超出就行了,我上面的图在 A、B 处肯定不是真相切的。

TOP

回复 6# abababa

试试去 https://www.mathcha.io 里用笔画出来,再导出 tikz

TOP

回复 7# kuing

试了一下:
QQ截图20210601150059.png
点 tikz 后
QQ截图20210601150259.png
复制出来是:
  1. \tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt        

  2. \begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
  3. %uncomment if require: \path (0,300); %set diagram left start at 0, and has height of 300

  4. %Shape: Free Drawing [id:dp18071961560476102]
  5. \draw  [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=3] [line join = round][line cap = round] (104,43.2) .. controls (104,80.6) and (103.57,120.08) .. (98,157.2) .. controls (96.19,169.28) and (95.17,182.29) .. (93,194.2) .. controls (91.65,201.61) and (88,208.27) .. (88,216.2) ;
  6. %Shape: Free Drawing [id:dp86482172172365]
  7. \draw  [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=3] [line join = round][line cap = round] (164,118.2) .. controls (159.14,121.12) and (153.56,122.84) .. (149,126.2) .. controls (136.51,135.4) and (127.39,145.09) .. (116,154.2) .. controls (114.14,155.69) and (107.98,160.92) .. (105,162.2) .. controls (103.06,163.03) and (98.22,162.24) .. (99,164.2) .. controls (103.37,175.12) and (116.63,181.18) .. (125,186.2) .. controls (131.64,190.18) and (136.65,200.97) .. (143,205.2) .. controls (147.16,207.97) and (151.46,210.66) .. (155,214.2) ;
  8. %Shape: Free Drawing [id:dp8934113718637382]
  9. \draw  [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=3] [line join = round][line cap = round] (194,122.2) .. controls (194,139.42) and (185.62,157.01) .. (185,176.2) .. controls (184.79,182.58) and (178.44,205.94) .. (191,207.2) .. controls (210.37,209.14) and (221.13,198.36) .. (231,185.2) .. controls (233.84,181.41) and (238,178.49) .. (240,174.2) .. controls (242.15,169.6) and (243.39,164.55) .. (246,160.2) .. controls (250.49,152.72) and (250.06,142.94) .. (252,135.2) .. controls (252.7,132.42) and (250.25,116.96) .. (253,125.2) .. controls (254.41,129.42) and (250.87,133.84) .. (250,138.2) .. controls (249.35,141.47) and (250.38,144.89) .. (250,148.2) .. controls (247.56,169.32) and (244,188.69) .. (244,210.2) ;
  10. %Shape: Free Drawing [id:dp8788589171357393]
  11. \draw  [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=3] [line join = round][line cap = round] (298,124.2) .. controls (292.47,149.1) and (293,185.77) .. (293,211.2) ;
  12. %Shape: Free Drawing [id:dp04160902226876839]
  13. \draw  [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=3] [line join = round][line cap = round] (296,85.2) .. controls (296,88.36) and (297.1,91.67) .. (299,94.2) ;
  14. %Shape: Free Drawing [id:dp5364140327815587]
  15. \draw  [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=3] [line join = round][line cap = round] (339,125.2) .. controls (337.05,142.76) and (333.41,160.56) .. (333,178.2) .. controls (332.76,188.53) and (333.26,198.87) .. (333,209.2) .. controls (332.93,211.89) and (332.08,219.89) .. (332,217.2) .. controls (331.26,193.67) and (330.49,163.59) .. (339,140.2) .. controls (343.85,126.85) and (367.04,123.95) .. (378,122.2) .. controls (381.64,121.62) and (388.11,119.63) .. (389,123.2) .. controls (391.15,131.79) and (390.85,142.61) .. (393,151.2) .. controls (394.28,156.31) and (397.27,160.98) .. (398,166.2) .. controls (400.02,180.73) and (398.36,195.54) .. (399,210.2) ;
  16. %Shape: Free Drawing [id:dp2909930747069298]
  17. \draw  [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=3] [line join = round][line cap = round] (486,120.2) .. controls (486,109.51) and (464.68,117.89) .. (454,118.2) .. controls (445.55,118.44) and (444.12,131.89) .. (442,137.2) .. controls (434.61,155.67) and (430.53,171.63) .. (432,192.2) .. controls (432.12,193.93) and (435.7,201.82) .. (438,202.2) .. controls (463.56,206.46) and (488.05,184.58) .. (497,162.2) .. controls (498.14,159.35) and (497.82,156.04) .. (499,153.2) .. controls (499.54,151.89) and (501.87,151.61) .. (502,150.2) .. controls (502.91,140.24) and (509.07,127.27) .. (502,120.2) .. controls (495.6,113.8) and (499.21,138.15) .. (499,147.2) .. controls (498.21,180.86) and (499.62,214.54) .. (499,248.2) .. controls (498.76,261.12) and (489.24,284.37) .. (474,286.2) .. controls (467.38,286.99) and (460.66,285.93) .. (454,286.2) .. controls (437.74,286.85) and (425.82,287.72) .. (415,274.2) .. controls (392.43,245.99) and (433.29,224.69) .. (449,216.2) .. controls (479.72,199.6) and (514.82,192.07) .. (545,174.2) .. controls (574.78,156.57) and (589.42,140.68) .. (614,120.2) ;




  18. \end{tikzpicture}
复制代码
$\href{https://kuingggg.github.io/}{\text{About Me}}$

TOP

回复 9# abababa

你这个是 node ,和 label 是不同嘀。
可以用 every node/.style={font=\scriptsize}

TOP

回复 9# abababa

你这图编译起来有点慢,用那么多 plot 还需要算三角函数,有点浪费资源了。

用画图那个,画得快就会光滑些,反正这种图又不用画精确。
而且画完后可以编辑,选中它,点 To Curve ,可以调整路径上的点(绿)和控制线(灰)什么的:
QQ截图20210601220126.png
其他功能自己摸索一下吧,我也是第一次玩这个。
  1. \tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt        

  2. \begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
  3. %uncomment if require: \path (0,300); %set diagram left start at 0, and has height of 300

  4. %Curve Lines [id:da6706373276390154]
  5. \draw [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=3] [line join = round][line cap = round]   (114.6,191.2) .. controls (93.6,178.2) and (84.45,142.55) .. (83.6,124.2) .. controls (82.95,110.29) and (83.65,88.79) .. (89.6,75.2) .. controls (95.81,61.01) and (113.9,48.34) .. (126.6,44.2) .. controls (155.13,34.91) and (200.92,31.83) .. (228.6,51.2) .. controls (251.94,67.54) and (261.03,102.77) .. (261.6,129.2) .. controls (260.6,151.2) and (260.6,175.2) .. (237.6,193.2) ;
  6. %Curve Lines [id:da5618889865772791]
  7. \draw [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=3] [line join = round][line cap = round]   (111.6,105.2) .. controls (128.6,81.2) and (151.6,85.2) .. (164.6,103.2) ;
  8. %Curve Lines [id:da0393879878023462]
  9. \draw [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=3] [line join = round][line cap = round]   (185.6,102.2) .. controls (199.6,82.2) and (226.6,85.2) .. (236.6,103.2) ;
  10. %Curve Lines [id:da19585522116648368]
  11. \draw [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=3] [line join = round][line cap = round]   (144.6,161.2) .. controls (148.18,163.98) and (160.07,169.93) .. (164.6,170.2) .. controls (187.6,174.2) and (204.6,165.2) .. (217.6,148.2) ;




  12. \end{tikzpicture}
复制代码

TOP

返回列表 回复 发帖