百科问答小站 logo
百科问答小站 font logo



LaTeX 下怎么画出这样的不规则图形? 第1页

  

user avatar   wang-da-li-53-45 网友的相关建议: 
      

可以在inkscape或Ai里面手工曲线描楼主的图,保存svg文件。用记事本打开这个svg文件,将里面的路径数据拷贝进入LaTeX里面就可以了,要用到tikz包的svg.path库。

这么做比插图的好处在于,可以在latex里面精细操作这个图形路径,包括颜色、填充、变形、在该路径上任意位置进行特定的修饰等等。

       documentclass{standalone} usepackage[svgnames]{xcolor} usepackage{tikz} usetikzlibrary{svg.path}  	ikzset{     mypic/.pic={         filldraw[yscale=-1, very thin]                svg {M 20.631227,29.742997 C 17.38776,19.138242 14.582606,16.065031 15.310251,10.376112 c 0.704012,-5.5041498 5.251924,-5.1599501 8.617262,-5.2709789 2.104337,-0.069426 3.056461,-0.040001 4.515002,0.3488546 2.082311,0.5551559 1.845746,2.0836708 4.568678,1.6005799 2.722932,-0.4830909 0.470228,-1.545139 1.059976,-2.149557 3.210176,-0.5689798 9.194583,-0.5034793 15.680875,-0.4217051 6.780183,0.1548345 12.88824,0.9461941 18.328899,4.0340804 2.230746,1.2660762 3.767489,3.2412291 5.273222,5.6040791 0.753271,1.18206 -0.123893,2.524998 1.214664,3.647124 2.045421,1.714696 3.728906,4.216071 3.258455,8.10111 -0.541404,4.470979 -1.840037,9.188679 -4.508248,12.867973 -1.916431,2.642637 -4.847002,4.514032 -7.778927,5.94932 -0.665374,0.325726 -1.509968,0.191634 -2.14915,0.566155 -0.389384,0.228155 -0.531028,0.784643 -0.940895,0.973545 -1.657994,0.764146 -3.64187,0.393616 -5.466556,0.335458 -2.16057,-0.06886 -4.282929,-0.598824 -6.434394,-0.808596 -3.212352,-0.313211 -6.451531,-0.315585 -9.659462,-0.671226 -0.926485,-0.102713 -1.365124,-0.603371 -2.389223,-0.221827 -3.028334,1.052449 -4.437486,0.989273 -6.882893,-0.476811 -1.184791,-0.710313 -2.380761,0.145351 -3.990904,-0.901106 -2.952037,-1.918575 -2.728386,-3.065025 -3.57089,-4.902956 -1.146877,-2.501924 0.0062,-3.972304 -0.780966,-5.732969 -0.554691,-1.240606 -1.86779,-1.914595 -2.643549,-3.103662 z};}, }  egin{document}   egin{tikzpicture}     draw (0,0) pic[draw=DarkBlue, fill=RoyalBlue] {mypic}            (3,0) pic[draw=Green, fill=LightGreen]{mypic}; end{tikzpicture} end{document}     




  

相关话题

  如何优雅地使用LaTeX写论文? 
  LaTeX 相对于 Word 有什么优势? 
  用 LaTeX 撰写的学术论文怎么方便地供老师评注和修改? 
  在将下载下来的Latex模板运行的时候出现了这样的错误,如图,应该怎么办呀? 
  在LaTeX发明前,人们怎么打印复杂的数学公式? 
  如何优雅地使用LaTeX写论文? 
  在LaTeX发明前,人们怎么打印复杂的数学公式? 
  请问这些示意图在LaTeX中怎么画出来? 
  LaTeX如何渲染? 
  latex中equation环境相比align环境有何优势? 

前一个讨论
有哪些在线 Linux 环境可以 ssh 登录来玩?
下一个讨论
复变函数、实分析、复分析、数学分析是什么关系?





© 2024-12-18 - tinynew.org. All Rights Reserved.
© 2024-12-18 - tinynew.org. 保留所有权利