lundi 6 juillet 2015

pst-crayon : dessiner un A

Une application du package pst-crayon :
voir les messages précédents.
http://pstricks.blogspot.fr/2015/07/pst-crayon-dessiner-lesperluette.html
http://pstricks.blogspot.fr/2015/07/pst-crayon-aiguiser-des-crayons-de_4.html

Le listing permettant de créer les images :

\documentclass{article}
\usepackage{pst-crayon}
% A majuscule en ZapfChancery
\def\Azap{0.115149   0.0450886   0.19154   0.023238   0.255011   0.00936456   0.314753   0.00208101   0.380132   0.0   0.503432   0.00893101   0.622917   0.0391057   0.744656   0.0952064   0.875153   0.181915   1.02065   0.304001   1.18748   0.46632   1.38188   0.673381   1.61036   0.930213   2.12792   0.925877   2.49548   0.910096   2.47051   0.730089   2.43062   0.465106   2.40045   0.260127   2.38233   0.13752   2.37548   0.0450886   2.38423   0.000346836   2.4086   -0.0343367   2.4451   -0.056881   2.49063   -0.0648582   2.55375   -0.0606095   2.6356   -0.0450886   2.81847   -0.0117924   2.95972   0.0139601   3.06689   0.0334696   3.14753   0.0481234   3.2091   0.0592222   3.2593   0.0681532   3.3056   0.0763038   3.35563   0.0849747   3.43575   0.20498   3.3206   0.194922   3.22947   0.186251   3.16878   0.181829   3.12022   0.180181   3.06568   0.180008   2.99718   0.182435   2.94134   0.190499   2.89694   0.20498   2.86295   0.22683   2.83833   0.256832   2.82211   0.296024   2.8131   0.345101   2.81041   0.405104   2.81925   0.571325   2.84405   0.820526   2.88186   1.13233   2.92981   1.48654   2.98504   1.86268   3.04461   2.24064   3.10574   2.60005   3.16557   2.9207   3.09551   2.97065   3.04071   2.91064   2.98669   2.86113   2.93934   2.83044   2.89009   2.81474   2.83052   2.81041   2.78466   2.81162   2.73306   2.81674   2.65893   2.82732   2.54543   2.84544   2.28044   2.88368   2.09038   2.89573   1.91262   2.87483   1.73782   2.8118   1.56293   2.70558   1.38526   2.55548   1.21401   2.36871   1.09583   2.18671   1.02724   2.0028   1.00513   1.81048   1.00825   1.72473   1.01944   1.64712   1.04094   1.56484   1.07519   1.46538   1.44526   1.6655   1.39497   1.82522   1.36263   1.9467   1.34529   2.04373   1.34017   2.13061   1.37945   2.32397   1.4933   2.46687   1.67565   2.55531   1.92043   2.58566   2.10529   2.5756   2.36542   2.54543   2.42672   2.53944   2.4843   2.53537   2.55115   2.53138   2.64046   2.52566   1.77545   1.40538   1.60767   1.1965   1.42402   0.976429   1.25346   0.780813   1.12513   0.645114   0.975908   0.509848   0.834573   0.421925   0.688555   0.374322   0.525109   0.360015   0.467534   0.361229   0.416983   0.366345   0.365478   0.376924   0.305215   0.395046   0.115149   0.0450886   1.76539   1.13519   2.73064   2.40045   2.52566   1.13519   1.76539   1.13519}
 %  nbre points = 113
\pagestyle{empty}
\newpsstyle{decor}{lightsrc=60 30 60 rtp2xyz,viewpoint=60 20 70 rtp2xyz,Decran=36,solidmemory,lightintensity=1}
\begin{document}
\begin{center}
\multido{\i=0+2}{109}{%
\begin{pspicture}(-6,-4)(6,8)
\psframe[fillstyle=solid,fillcolor=cyan!10](-6,-4)(6,8)
\psset{style=decor}
\psSolid[object=grille,base=-5 3 -3 7,ngrid=8 10,fillcolor=black,linecolor=white,linewidth=0.01](0,0,0)
\psSolid[object=plan,definition=equation,args={[0 0 1 0] 90},name=P0,base=-4 4 -4 6,action=none]
\pstVerb{/tabC [\Azap] def /II \i\space 2 add def }%
\psProjection[object=line,plan=P0,linecolor=white,args=tabC 0 II getinterval aload pop,linewidth=0.035]
\psCrayonH[RotX=30,pencolor=white,grid,unit=0.5](tabC II 1 sub get neg 2 mul,tabC II 2 sub get 2 mul,0)
\end{pspicture}\newpage}
\multido{\i=0+2}{4}{%
\begin{pspicture}(-6,-4)(6,8)
\psframe[fillstyle=solid,fillcolor=cyan!10](-6,-4)(6,8)
\psset{style=decor}
\psSolid[object=grille,base=-5 3 -3 7,ngrid=8 10,fillcolor=black,linecolor=white,linewidth=0.01](0,0,0)
\psSolid[object=plan,definition=equation,args={[0 0 1 0] 90},name=P0,base=-4 4 -4 6,action=none]
\psProjection[object=line,plan=P0,linecolor=white,args=tabC 0 218 getinterval aload pop,linewidth=0.035]
\pstVerb{/tabC [\Azap] def /II \i\space 2 add def }%
\psProjection[object=line,plan=P0,linecolor=white,linewidth=0.035,args=tabC 218 II getinterval aload pop]
\psCrayonH[RotX=30,pencolor=white,grid,unit=0.5](tabC 218 II 1 sub add get neg 2 mul,tabC 218 II 2 sub add get 2 mul,0)
\end{pspicture}\newpage}
\begin{pspicture}(-6,-4)(6,8)
\psframe[fillstyle=solid,fillcolor=cyan!10](-6,-4)(6,8)
\psset{style=decor}
\psSolid[object=grille,base=-5 3 -3 7,ngrid=8 10,fillcolor=black,linecolor=white,linewidth=0.01](0,0,0)
\pstVerb{/tabC [\Azap] def}%
\psSolid[object=plan,definition=equation,args={[0 0 1 0] 90},name=P0,base=-4 4 -4 4,action=none]
\psProjection[object=texte,PSfont=ZapfChancery, % Palatino-Italic,
              fontsize=142.2637,linecolor=white,
              text=A,
              pos=ur,
              plan=P0](0,-0.18)%
\end{pspicture}
\end{center}
\end{document}

Aucun commentaire:

Enregistrer un commentaire