首页 > 代码库 > 用LaTeX的pstricks绘图宏包制作一幅图片
用LaTeX的pstricks绘图宏包制作一幅图片
现在Geogebra中作一个宏,把重复绘制五角星的动作简化;然后绘制完毕之后导出为pstricks代码:
\documentclass[10pt]{article} \usepackage{pstricks-add} \pagestyle{empty} \begin{document} \psset{xunit=0.2cm,yunit=0.2cm,algebraic=true,dimen=middle,dotstyle=o,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25} \begin{pspicture*}(-1.9821814218298148,-21.840571816907325)(61.786984589480895,22.09793891039823) \pspolygon[linecolor=red,fillcolor=red,fillstyle=solid,opacity=1.0](0.,-20.)(60.,-20.)(60.,20.)(0.,20.) \pspolygon[linecolor=yellow,fillcolor=yellow,fillstyle=solid,opacity=1.0](10.,16.)(8.652916070261245,11.854101966249683)(4.293660902229079,11.854101966249685)(7.820372415983917,9.291796067500632)(6.473288486245162,5.145898033750316)(10.,7.70820393249937)(13.526711513754838,5.145898033750316)(12.179627584016083,9.29179606750063)(15.70633909777092,11.854101966249683)(11.347083929738757,11.854101966249681) \pspolygon[linecolor=yellow,fillcolor=yellow,fillstyle=solid,opacity=1.0](18.43826238111394,3.249390095108849)(19.236890981826892,2.0354508305140513)(18.32915594366165,0.900782032807502)(19.73047060145526,1.285195104716416)(20.529099202168215,0.07125584012162056)(20.596530688905144,1.5227754488758831)(21.99784534669876,1.9071885207847978)(20.63820563962051,2.419863902422967)(20.705637126357438,3.8713835111772315)(19.797902088192192,2.7367147134706795) \pspolygon[linecolor=yellow,fillcolor=yellow,fillstyle=solid,opacity=1.0](22.07695210471835,6.549442255794757)(23.28238804717758,5.738035841826311)(22.883194881659485,4.340859762512995)(24.027388430878137,5.236559099304147)(25.232824373337362,4.425152685335702)(24.73453893400364,5.790131733141817)(25.878732483222294,6.685831069932968)(24.42658159639623,6.633735178617463)(23.92829615706251,7.998714226423578)(23.52910299154442,6.6015381471102605) \pspolygon[linecolor=yellow,fillcolor=yellow,fillstyle=solid,opacity=1.0](18.285014148574913,14.971008489144946)(19.701063214815463,15.296985822714227)(20.448669308408153,14.050975666726414)(20.57622966748969,15.498450894422104)(21.992278733730235,15.824428227991374)(20.65506630501921,16.393039783011513)(20.782626664100732,17.840515010707207)(19.828623573896998,16.7444610504099)(18.491411145185968,17.313072605430055)(19.239017238778654,16.06706244944224) \pspolygon[linecolor=yellow,fillcolor=yellow,fillstyle=solid,opacity=1.0](22.020101012677667,11.717157287525382)(23.451679711208026,11.468081777055572)(23.657176970557234,10.029600961611155)(24.336444004470135,11.314144645820003)(25.768022703000497,11.065069135350205)(24.75625411886563,12.108036302695082)(25.435521152778534,13.392579986903943)(24.130946745120923,12.752625461264428)(23.119178160986067,13.795592628609317)(23.32467542033527,12.357111813164895) \end{pspicture*} \end{document}
在LaTeX下编译之后的效果如下:
用LaTeX的pstricks绘图宏包制作一幅图片
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。