如何得到平滑的曲线?

如何得到平滑的曲线?

到目前为止我已经尝试过了,有人能帮我把边界弄得平滑吗?下面是我的 MWE

\documentclass[a4paper]{article}
\usepackage{tikz}
\usepackage{graphicx}
\begin{document}
\reflectbox{
\begin{tikzpicture}[rotate=0]

\draw[thick]  plot[smooth, tension=0.3] coordinates {(5,3.5) (4.91,3.57) (4.81,3.62) (4.68,3.73) (4.54,3.85) (4.41,3.97) (4.32,4.08) (4.16,4.22) (4.04,4.44) (3.96,4.63) (3.91,4.80)  (3.89,4.97) (3.86,5.16) (3.86,5.31) (3.86,5.42) (3.87,5.56) (3.91,5.78) (4.00,6.03) (4.08,6.28) (4.21,6.46) (4.36,6.67) (4.55,6.84) (4.76,6.98) (5,7.11) (5.19,7.24) (5.29,7.29) (5.38,7.39) (5.47,7.46) (5.55,7.54) (5.63,7.64) (5.72,7.81) (5.81,7.97) (5.96,8.28) (6.06,8.61) (6.06,8.94)  (6.02,9.27) (5.92,9.52) (5.81,9.76) (5.66,9.98) (5.48,10.13) (5.34,10.26) (5.19,10.38) (4.97,10.47) (4.73,10.55) (4.52,10.58) (4.27,10.56) (4.08,10.55) (3.91,10.54) (3.71,10.48) (3.53,10.38) (3.28,10.23) (3.07,9.98) (2.95,9.94) (2.81,9.77) (2.67,9.62) (2.59,9.45) (2.52,9.33) (2.43,9.19) (2.38,9.04) (2.32,8.90) (2.27,8.73) (2.21,8.57) (2.16,8.36) (2.11,8.26) (2.07,8.11) (2.04,7.96) (2.02,7.77) (2.02,7.59) (1.99,7.32) (1.98,7.13) (2.00,6.89) (2.00,6.71) (2.03,6.52) (2.04,6.34) (2.07,6.20) (2.11,5.98) (2.16,5.81) (2.21,5.65) (2.27,5.48) (2.34,5.31) (2.42,5.11) (2.49,4.90) (2.56,4.75) (2.68,4.55) (2.77,4.40) (2.90,4.21) (3.04,4.03) (3.17,3.86) (3.26,3.76) (3.35,3.65) (3.44,3.58) (3.54,3.47) (3.64,3.40) (3.68,3.36) (3.76,3.32) (3.83,3.25) (3.94,3.19) (4,3.13) (4.04,3.08) (4.14,3.04) (4.21,2.99) (4.32,2.92) (4.39,2.88) (4.47,2.83) (4.55,2.79) (4.62,2.75) (4.72,2.70) (4.81,2.65) (4.93,2.63) (5.02,2.56) (5.16,2.52) (5.26,2.47) (5.34,2.43) (5.42,2.4) (5.49,2.38) (5.42,2.49) (5.37,2.59) (5.31,2.7) (5.23,2.81) (5.16,2.96) (5.11,3.07) (5.06,3.19) (5.05,3.3) (5.02,3.38) (5,3.5)};


\end{tikzpicture}}

\end{document}

这是我的 MWE 的输出

在此处输入图片描述

我正在尝试制作如下所示的蓝色形状 在此处输入图片描述

答案1

像这样?

在此处输入图片描述

\documentclass[tikz, margin=3mm]{standalone}

\begin{document}
    \begin{tikzpicture}%[scale=-1]
\draw[thick]    (1.5,7) .. controls + (-0.8, 0.0) and + ( 0.0, 0.8) .. (0,5.5)
                        .. controls + ( 0.0,-1.0) and + (-1.0, 1.0) .. (2.5,0)
                        .. controls + (-0.2, 0.2) and + (-0.1,-0.4) .. (2.4,1)
                        .. controls + (-0.8, 0.8) and + ( 0.0,-0.4) .. (1.6,3)
                        .. controls + ( 0.0, 1.2) and + ( 0.0,-1.2) .. (3,5.5)
                        .. controls + ( 0.0, 0.8) and + ( 0.8, 0.0) .. (1.5,7)
                ;
    \end{tikzpicture}
\end{document}

答案2

既然你有这个漂亮的图形,为什么不使用它将potrace其转换为矢量图形,并将其保存为epspdf文件?当然,你可以将它加载到并将其转换为,然后从那里inkscape转换为。最后一步在我的计算机上不起作用,所以我提供了文件。(不幸的是,我也不知道如何转换为,我天真的使用想法并没有产生预期的结果。)pstrickstikzpstricks\curvetotikz\draw [smooth]

\documentclass{standalone}
\usepackage{pstricks}
\begin{document}
\psset{xunit=.5pt,yunit=.5pt,runit=.5pt}
\begin{pspicture}(518.66668701,870.66668701)
{
\newrgbcolor{curcolor}{0 0 0}
\pscustom[linestyle=none,fillstyle=solid,fillcolor=blue]
{
\newpath
\moveto(397.3333234,857.34399558)
\curveto(396.22532343,856.74799559)(391.46665688,854.95732897)(386.666657,853.33332901)
\curveto(381.86665712,851.70932905)(376.21599059,849.62666244)(373.99999065,848.66666246)
\curveto(371.81865737,847.72132915)(366.6666575,845.6333292)(362.6666576,844.07199591)
\curveto(352.53332452,840.11866268)(327.51065848,829.02532962)(326.7146585,828.13332964)
\curveto(326.31865851,827.68932965)(319.46665868,824.11066308)(311.33332555,820.09866318)
\curveto(281.59999296,805.43066354)(239.33732735,778.41733088)(219.46666118,761.37999798)
\curveto(210.93332806,754.06266483)(191.33866188,736.67333193)(190.71732857,735.86666528)
\curveto(190.31999524,735.34933196)(185.25199537,729.99999876)(179.35066218,723.86666558)
\curveto(168.66666245,712.76533253)(152.24666286,692.93333302)(144.13332973,681.33333331)
\curveto(131.63853004,663.46666709)(128.90626344,659.3266672)(122.13386361,648.00000081)
\curveto(118.06826371,641.20000098)(113.13639717,632.3760012)(111.06666389,628.20000131)
\curveto(109.01826394,624.06666808)(107.03226399,620.36533484)(106.666664,620.00000151)
\curveto(105.56253069,618.89600154)(93.64173099,593.20000218)(90.5838644,585.33333571)
\curveto(89.02919777,581.33333581)(86.89426449,576.18133594)(85.88693119,574.00000266)
\curveto(82.93906459,567.61200282)(71.89693154,537.46667024)(69.03799827,528.00000381)
\curveto(54.7234653,480.60533833)(49.4469321,443.46667259)(49.39319877,389.7333406)
\curveto(49.3521321,348.4000083)(52.92293201,313.92667583)(60.75879848,280.00001001)
\curveto(66.45626501,255.33334396)(79.35933135,214.23867832)(85.24999787,202.00001196)
\curveto(85.94999785,200.54534533)(87.82133114,196.00001211)(89.36666443,192.00001221)
\curveto(93.94733098,180.14401251)(105.21666404,158.93334637)(113.80626382,146.00001336)
\curveto(150.20132958,91.20001473)(194.05599515,58.72241554)(247.33332715,47.1130825)
\curveto(261.46666013,44.03334924)(300.38932582,44.01828258)(314.13332548,47.0874825)
\curveto(346.666658,54.35214899)(375.42132395,69.57134861)(398.13332338,91.54734806)
\curveto(431.14265589,123.48748059)(447.28665548,158.66667971)(450.4706554,205.60001187)
\curveto(452.1799887,230.80001124)(450.25065541,252.24401071)(444.81732221,268.4000103)
\curveto(439.52665568,284.13334324)(435.02798912,294.09067633)(427.04798932,307.73334265)
\curveto(411.9159897,333.60000867)(387.05999032,359.75067468)(362.6666576,375.46800763)
\curveto(359.33332435,377.61467424)(356.37065776,379.71867419)(355.9999911,380.20000751)
\curveto(355.63465778,380.67467416)(348.39999129,384.77467406)(339.9999915,389.26667395)
\curveto(331.59999171,393.75867383)(322.97865859,398.77867371)(320.93332531,400.36934034)
\curveto(293.73332599,421.51467314)(278.46532637,437.64000607)(265.73332669,458.66667221)
\curveto(252.53332702,480.46667167)(246.06132718,499.46667119)(239.84666067,534.66667031)
\curveto(237.18666074,549.7333366)(237.57332739,590.0013356)(240.51199399,603.73333525)
\curveto(246.52932717,631.86666788)(258.37599354,657.14666725)(276.62665975,680.79999999)
\curveto(289.40665943,697.36266624)(315.73332544,720.85999899)(336.39999159,734.15066532)
\curveto(345.19999137,739.80933185)(346.63332467,741.28133181)(347.29465798,745.33333171)
\curveto(349.45065793,758.53333138)(352.63599118,772.39733104)(355.56665778,781.33333081)
\curveto(360.72799098,797.06666375)(378.99332386,833.03066285)(383.9999904,837.31466275)
\curveto(384.43465706,837.68666274)(386.23199034,840.13332934)(387.93332363,842.66666261)
\curveto(389.62665693,845.18932922)(393.22265684,849.59999577)(395.75865677,852.26666237)
\curveto(400.44932332,857.19999558)(401.12798997,859.38666219)(397.3333234,857.34399558)
}
}
\end{pspicture}
\end{document}

在此处输入图片描述

如果人们觉得这个论坛不适合被大量的坐标淹没,我会很乐意删除这篇帖子。

相关内容