\makeatletter
\pstheader{portion-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}
\psset[pst-V3D]{nF=20,nH=5}
\define@key[psset]{pst-V3D}{anglebegin}{\def\pst@VIIID@anglebegin{#1}} \define@key[psset]{pst-V3D}{angleend}{\def\pst@VIIID@angleend{#1}}
\psset[pst-V3D]{anglebegin=0,angleend=180}
\def\psCylindricalPortion{\pst@object{psCylindricalPortion}}
\def\psCylindricalPortion@i(#1,#2,#3)#4#5{{ \begin@ClosedObj \use@par
\addto@pscode{ 1 setlinejoin
\tx@parametresIIID
CylindricalPortionDict begin
/Hcylindre #5 def
/incrementHAUTEUR Hcylindre \pst@VIIID@nH\space div def
/Rcylindre #4 def
/CX #1 def
/CY #2 def
/CZ #3 def
/anglebegin \pst@VIIID@anglebegin\space def
/angleend \pst@VIIID@angleend\space def
/incrementANGLE {angleend anglebegin sub \pst@VIIID@nF\space div} bind def
/pas {angleend anglebegin sub angleend anglebegin sub abs div} bind 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
cylindricalportion
Face_superieure
Face_inferieure
Plat
\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
PSplat 0 ge {
gsave
PlatDraw clip
cylindricalportion
grestore
} if
PSfaceSup 0 ge {
gsave
FaceSup clip
cylindricalportion
grestore
} if
PSfaceInf 0 ge {
FaceInf clip
cylindricalportion
}
if
\else
PSfaceSup 0 ge {
gsave
FaceSup
H_S 1 sethsbcolor fill
newpath
FaceSup
closepath
0 setgray stroke
grestore } if
PSfaceInf 0 ge {
FaceInf
H_S 1 sethsbcolor fill
FaceInf
0 setgray stroke } if
PSplat 0 ge {
PlatDraw
H_S 1 sethsbcolor fill
PlatDraw
0 setgray stroke
} if
\fi
end
}\showpointsfalse
\end@ClosedObj}}
\makeatother

—
Syracuse — Dernière modification : 25 août 2006 (0.09s - 3788998 - 23 novembre 2008)