\documentclass{article}
\usepackage{pst-crayon}
\def\avion{0.174764 1.73441 0.349877 1.66444 0.18486 1.0747 0.439696 1.10951 0.809764 1.60456 1.01073 1.58454 1.22204 1.56505 1.39585 1.55016 1.48445 1.54433 1.57845 1.54268 1.64964 1.5412 1.70178 1.53954 1.73859 1.53754 1.76392 1.53484 1.78159 1.5311 1.79542 1.52614 1.80926 1.51961 1.86105 1.47566 1.87924 1.4096 1.87602 1.366 1.86122 1.29393 1.82658 1.15712 1.76435 0.919775 1.32953 -0.0651014 1.51439 -0.0651014 1.57244 -0.0602275 1.61883 -0.0406449 1.66418 0.000348136 1.71944 0.0699753 1.9144 0.345003 2.21937 0.345003 2.2413 0.351791 2.26053 0.369807 2.27402 0.395308 2.27925 0.424726 2.27402 0.457015 2.26053 0.48417 2.2413 0.502708 2.21937 0.509671 2.05435 0.509671 2.29909 0.859548 2.59918 0.859548 2.62112 0.866423 2.64035 0.885136 2.65384 0.912203 2.65906 0.944493 2.65375 0.974694 2.63965 1.00211 2.61894 1.02204 2.59396 1.02979 2.43904 1.02979 2.80911 1.52449 2.85402 1.52936 3.1367 1.54216 3.31373 1.5526 3.43454 1.56391 3.5489 1.57949 3.65403 1.60438 3.73437 1.64007 3.78563 1.68419 3.80373 1.73441 3.76335 1.79969 3.6462 1.85182 3.45777 1.8889 3.2039 1.90918 2.85402 1.92415 2.80911 1.92937 2.43904 2.42407 2.59396 2.42407 2.61894 2.43173 2.63965 2.45218 2.65375 2.48099 2.65906 2.51424 2.65384 2.54339 2.64035 2.56898 2.62112 2.58709 2.59918 2.59396 2.29909 2.59396 2.05435 2.94384 2.21937 2.94384 2.2413 2.95071 2.26053 2.96943 2.27402 2.99649 2.27925 3.02878 2.27402 3.05811 2.26053 3.08379 2.2413 3.10189 2.21937 3.10885 1.9144 3.10885 1.71944 3.38388 1.66418 3.45621 1.61883 3.49877 1.57244 3.51878 1.51439 3.52383 1.32953 3.52383 1.76435 2.53408 1.82658 2.30074 1.86122 2.16358 1.87602 2.08916 1.87924 2.04425 1.86792 1.98881 1.83363 1.9493 1.77593 1.92476 1.69438 1.9144 1.52936 1.90918 1.47209 1.90883 1.41952 1.90665 1.34807 1.90074 1.23449 1.88933 0.98975 1.86949 0.809764 1.8493 0.439696 2.344 0.18486 2.37916 0.349877 1.78942 0.174764 1.73441}
\def\projPolygon{%
% il y a un bug dans la définition de /proj-pst-polygone dans pst-solides3d.pro,
% d'où cette nouvelle définition
/proj-pst-polygone {
proj-action (none) eqstring not {
l@pl@n plangetrange aload pop
setyrange setxrange
% newpath
% xmin ymin l@pl@n pointplan smoveto
% xmin ymax l@pl@n pointplan slineto
% xmax ymax l@pl@n pointplan slineto
% xmax ymin l@pl@n pointplan slineto
% xmin ymin l@pl@n pointplan slineto
% planprojpst projpath
% clip
solidlinewidth setlinewidth
linestyle
linecolor
proj-definition length 0 eq {
[proj-args]
} {
proj-args
} ifelse
proj-definition cvx exec polygone_
planprojpst projectionsifacevisible projpath
} if
/projname where {
pop
proj-definition length 0 eq {
[proj-args]
} {
proj-args
} ifelse
proj-definition cvx exec projname cvlit exch def
/projname where pop /projname undef
} if
} def
}
\pagestyle{empty}
\begin{document}
\begin{center}
\psset{RotSequence=zyx}
\multido{\i=0+4}{58}{% 115 points => 230 éléments 4 x 57 =228
\begin{pspicture}(-1,-4)(12,7)
\psframe[fillstyle=solid,fillcolor=cyan!20](-1,-4)(12,7)
\psset{lightsrc=viewpoint,viewpoint=100 20 30 rtp2xyz,Decran=60,solidmemory}
\psSolid[object=grille,base=-8 1 0 10,ngrid=16 17,linewidth=0.01,linecolor=blue](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 [\avion] {2 mulv} papply def /II \i\space 2 add def }%
\psProjection[object=line,plan=P0,linewidth=0.06,args=tabC 0 II getinterval aload pop]
\psCrayonH[RotY=40,RotX=-10,RotZ=20,pencolor=black,grid,h=15,r=0.4,colorpencilbody=gray,colorbody](tabC II 1 sub get neg,tabC II 2 sub get,0)
\end{pspicture}\newpage}
\multido{\i=0+1}{11}{%
\begin{pspicture}(-1,-4)(12,7)
\psframe[fillstyle=solid,fillcolor=cyan!20](-1,-4)(12,7)
\psset{lightsrc=viewpoint,viewpoint=100 20 30 rtp2xyz,Decran=60,solidmemory}
\psSolid[object=grille,base=-8 1 0 10,ngrid=16 17,linewidth=0.01,linecolor=blue](0,0,0)
\codejps{\projPolygon}
\psSolid[object=plan,definition=equation,args={[0 0 1 -\i\space 2 div] 90},name=P0,base=-4 4 -4 6,action=none]
\pstVerb{/tabC [\avion] {2 mulv} papply def}%
\psProjection[object=polygone,plan=P0,linewidth=0.06,args=tabC 0 228 getinterval {\i\space 0 addv} papply aload pop,fillstyle=solid,fillcolor=blue](\i,0)
\end{pspicture}\newpage}
\end{center}
\end{document}
Aucun commentaire:
Enregistrer un commentaire