\makeatletter
\pstheader{cylindre.pro}
\define@key[psset]{pst-V3D}{nF}{\def\pst@VIIID@nF{#1}} \define@key[psset]{pst-V3D}{nH}{\def\pst@VIIID@nH{#1}}
\newif\ifPst@interior\define@key[psset]{pst-V3D}{interior}[false]{\@nameuse{Pst@interior#1}}
\psset[pst-V3D]{interior=false}
\newif\ifPst@cylindre\define@key[psset]{pst-V3D}{cylindre}[true]{\@nameuse{Pst@cylindre#1}}
\psset[pst-V3D]{cylindre=true}
\psset[pst-V3D]{nF=20,nH=5}
\define@key[psset]{pst-V3D}{colorbase}{\def\psk@IIID@colorbase{#1}} \psset[pst-V3D]{colorbase=0.8 0.8 0.8}
\def\psCylindre{\pst@object{psCylindre}}
\def\psCylindre@i(#1,#2,#3)#4#5{{ \begin@ClosedObj \use@par
\addto@pscode{ 1 setlinejoin
\tx@parametresIIID
CylindreDict begin
/incrementANGLE {360 \pst@VIIID@nF\space div} bind def
/Hcylindre #5 def
/incrementHAUTEUR Hcylindre \pst@VIIID@nH\space div def
/Rcylindre #4 def
/CX #1 def
/CY #2 def
/CZ #3 def
/PointsApresTransformations {
3 dict begin
M11 Xpoint mul M12 Ypoint mul add M13 Zpoint mul add CX add
M21 Xpoint mul M22 Ypoint mul add M23 Zpoint mul add CY add
M31 Xpoint mul M32 Ypoint mul add M33 Zpoint mul add CZ add
end
} def
/ChangeSigne {1 mul} def
/condition {PSfacette 0 ge} def
\ifPst@cylindrecylindre
\fi
Face_superieure
Face_inferieure
\ifPst@interior
H_S exch /h ED /s ED
/ChangeSigne { -1 mul } def
/H_S { h dup mul s 2 div } def
/condition {PSfacette 0 le} def
PSfaceSup 0 ge {
gsave
FaceSup clip
cylindre
grestore
} if
PSfaceInf 0 ge {
FaceInf clip
cylindre
}
if
\else
PSfaceSup 0 ge {
gsave
FaceSup
H_S 1 sethsbcolor fill
FaceSup
0 setgray stroke
grestore } if
PSfaceInf 0 ge {
FaceInf
H_S 1 sethsbcolor fill
FaceInf
0 setgray stroke } if
\fi
end
}\showpointsfalse
\end@ClosedObj}}
\makeatother

—
Syracuse — Dernière modification : 24 août 2006 (0.1s - 3949767 - 9 janvier 2009)