\documentclass{article}
\usepackage{pst-solides3d}
\begin{document}
\begin{center}
\begin{pspicture}(-5,-6)(5,6)
\psframe(-5,-6)(5,6)
\psset[pst-solides3d]{viewpoint=100 40 0 rtp2xyz,Decran=100,lightsrc=viewpoint}
\pstVerb{/n1 24 def /n2 48 def}%
\defFunction[algebraic]{torus}(u,v){(3+ 1.5*cos(u))*cos(v)}{1.5*sin(u)}{(3+ 1.5*cos(u))*sin(v)}
\psSolid[object=surfaceparametree,
base=pi 4 div pi 1.75 mul 0 2 pi mul ,
fcol=0 2 n1 2 mul 2 sub {/i exch def
i n2 mul 2 i n2 mul n2 add 1 sub {(White)} for} for
1 2 n1 2 mul 1 sub {/i exch def
i n2 mul 1 add 2 i n2 mul n2 add 1 sub {(White)} for} for,
fillcolor=black,incolor=red,
function=torus,
linewidth=0.5\pslinewidth,unit=1,
ngrid=n1 n2]%
\end{pspicture}
\end{center}
\end{document}
Aucun commentaire:
Enregistrer un commentaire