Source de cube_object.tex
Fichier TeX
\makeatletter
\pstheader{cube.pro}
\define@key[psset]{pst-V3D}{A}{\def\psk@IIID@A{#1}}       % largeur
\define@key[psset]{pst-V3D}{B}{\def\psk@IIID@B{#1}}       % longueur
\define@key[psset]{pst-V3D}{C}{\def\psk@IIID@C{#1}}       % hauteur
\define@key[psset]{pst-V3D}{d}{\def\psk@IIID@d{#1}}       % fraction d'arete
\psset[pst-V3D]{A=2,B=A,C=A,d=5}

\def\psCube{\pst@object{psCube}}
\def\psCube@i(#1,#2,#3){{%
  \begin@ClosedObj
    \use@par
    \addto@pscode{%
    1 setlinejoin
    \tx@parametresIIID
    CubeDict begin
    /A \psk@IIID@A\space def
    /B \psk@IIID@B\space def
    /C \psk@IIID@C\space def
    /d \psk@IIID@d\space 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
CUBE
end}% fin du code ps
    \end@ClosedObj%
}}
\makeatother

 

Validation CSS Validation XHTMLSyracuse — Dernière modification : 18 août 2006 (0.08s - 3438590 - 30 août 2008) vers le haut