%% $Id: pst-platon.sty 208 2009-12-25 08:54:53Z herbert $ %% %% This is file `pst-platon.sty', %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN archives %% in directory macros/latex/base/lppl.txt. %% %% Manuel Luque (France) %% Herbert Voss \z@ \ThreeDput[normal=#1 #2 #3](#4,#5,#6){#7% \rput(0,0){\psk@faceNameFont\setcounter{face@counter}{#8}% \pst@faceName{face@counter}}}\fi% } % \def\psTetrahedron{\pst@object{psTetrahedron}} \def\psTetrahedron@i{{% \pst@killglue% \addbefore@par{fillstyle=solid,dimen=middle,radius=1.633,colorType=B}% \use@par% \def\faceA[##1]{\pspolygon[##1](\psk@radius;90)(\psk@radius;210)(\psk@radius;330)} \def\faceB[##1]{\pspolygon[##1](\psk@radius;30)(\psk@radius;150)(\psk@radius;270)} \psset[pst-3d]{viewpoint=\psk@platon@Viewpoint}% \psscalebox{\psk@@psscale}{% \ifPst@PstPicture\pspicture(-1.4,-1.6)(1.4,1.6)\fi% \pst@ifpos(1,1,-1)[\pst@t,\pst@t,-\pst@t]{\faceA[fillcolor=ColorA]}{1}% face 1 \pst@ifpos(-1,1,1)[-\pst@t,\pst@t,\pst@t]{\faceB[fillcolor=ColorB]}{2}% face 2 \pst@ifpos(1,-1,1)[\pst@t,-\pst@t,\pst@t]{\faceB[fillcolor=ColorC]}{3}% face 3 \pst@ifpos(-1,-1,-1)[-\pst@t,-\pst@t,-\pst@t]{\faceA[fillcolor=ColorC]}{4}% face 4 \ifPst@Frame\pst@showFrame{}\fi \ifPst@PstPicture\endpspicture\fi% }}\ignorespaces} % \def\psHexahedron{\pst@object{psHexahedron}} \def\psHexahedron@i{{% \pst@killglue% \addbefore@par{fillstyle=solid,dimen=middle,colorType=B}% \use@par% \def\face[##1]{\psframe[##1](-1,-1)(1,1)}% \psscalebox{\psk@@psscale}{% \ifPst@PstPicture\pspicture(-1.4,-1.7)(1.4,1.7)\fi% \psset[pst-3d]{viewpoint=\psk@platon@Viewpoint}% \pst@ifpos(1,0,0){\face[fillcolor=ColorA]}{1} % face1 \pst@ifpos(0,1,0){\face[fillcolor=ColorB]}{2} % face2 \pst@ifpos(-1,0,0){\face[fillcolor=ColorC]}{3}% face3 \pst@ifpos(0,-1,0){\face[fillcolor=ColorD]}{4}% face4 \pst@ifpos(0,0,1){\face[fillcolor=ColorE]}{5} % face5 \pst@ifpos(0,0,-1){\face[fillcolor=ColorF]}{6}% face6 \ifPst@Frame\pst@showFrame\fi \ifPst@PstPicture\endpspicture\fi% }}\ignorespaces} % \def\psOctahedron{\pst@object{psOctahedron}} \def\psOctahedron@i{{% \pst@killglue% \addbefore@par{fillstyle=solid,dimen=middle,radius=0.8165,colorType=B}% \use@par% \def\faceA[##1]{\pspolygon[##1](\psk@radius;90)(\psk@radius;210)(\psk@radius;330)} \def\faceB[##1]{\pspolygon[##1](\psk@radius;30)(\psk@radius;150)(\psk@radius;270)} \psset[pst-3d]{viewpoint=\psk@platon@Viewpoint}% \psscalebox{\psk@@psscale}{% \ifPst@PstPicture\pspicture(-1,-1)(1,1)\fi% \pst@ifpos(1,1,1)[\pst@t,\pst@t,\pst@t]{\faceA[fillcolor=ColorA]}{1}% face 1 \pst@ifpos(-1,1,1)[-\pst@t,\pst@t,\pst@t]{\faceA[fillcolor=ColorB]}{2}% face 2 \pst@ifpos(-1,-1,1)[-\pst@t,-\pst@t,\pst@t]{\faceA[fillcolor=ColorC]}{3}% face 3 \pst@ifpos(1,-1,1)[\pst@t,-\pst@t,\pst@t]{\faceA[fillcolor=ColorD]}{4}% face 4 \pst@ifpos(1,1,-1)[\pst@t,\pst@t,-\pst@t]{\faceB[fillcolor=ColorE]}{5}% face 5 \pst@ifpos(-1,1,-1)[-\pst@t,\pst@t,-\pst@t]{\faceB[fillcolor=ColorF]}{6}% face 6 \pst@ifpos(1,-1,-1)[\pst@t,-\pst@t,-\pst@t]{\faceB[fillcolor=ColorG]}{7}% face 7 \pst@ifpos(-1,-1,-1)[-\pst@t,-\pst@t,-\pst@t]{\faceB[fillcolor=ColorH]}{8}% face 8 \ifPst@Frame\pst@showFrame\fi \ifPst@PstPicture\endpspicture\fi% }}\ignorespaces} % \def\psDodecahedron{\pst@object{psDodecahedron}} \def\psDodecahedron@i{{% \pst@killglue% \addbefore@par{fillstyle=solid,colorType=A}% \use@par% \def\RA{1.05146}\def\rb{0.723607}\def\ra{1.17082}% \def\rc{0.723607}\def\rd{1.17082}% \psset[pst-3d]{viewpoint=\psk@platon@Viewpoint}% \def\faceA[##1]{\pspolygon[##1](\RA;18)(\RA;90)(\RA;162)(\RA;234)(\RA;306)}% \def\faceB[##1]{\pspolygon[##1](\RA;270)(\RA;-18)(\RA;54)(\RA;126)(\RA;198)}% \def\faceC[##1]{\pspolygon[##1](\RA;0)(\RA;72)(\RA;144)(\RA;216)(\RA;288)}% \def\faceD[##1]{\pspolygon[##1](\RA;36)(\RA;108)(\RA;180)(\RA;252)(\RA;324)}% \psscalebox{\psk@@psscale}{% \ifPst@PstPicture\pspicture(-1.1,-1.8)(1.1,1.8)\fi% \pst@ifpos(0,\ra,\rb){\faceA[fillcolor=ColorA]}{1}% face1 \pst@ifpos(0,-\ra,\rb){\faceA[fillcolor=ColorB]}{2}% face2 \pst@ifpos(0,\ra,-\rb){\faceB[fillcolor=ColorC]}{3}% face3 \pst@ifpos(0,-\ra,-\rb){\faceB[fillcolor=ColorD]}{4}% face4 \pst@ifpos(\rc,0,\rd){\faceB[fillcolor=ColorE]}{5}% face5 \pst@ifpos(-\rc,0,\rd){\faceB[fillcolor=ColorF]}{6}% face6 \pst@ifpos(\rc,0,-\rd){\faceA[fillcolor=ColorG]}{7}% face7 \pst@ifpos(-\rc,0,-\rd){\faceA[fillcolor=ColorH]}{8}% face8 \pst@ifpos(\rd,\rc,0){\faceC[fillcolor=ColorI]}{9}% face9 \pst@ifpos(-\rd,\rc,0){\faceD[fillcolor=ColorJ]}{10}% face10 \pst@ifpos(\rd,-\rc,0){\faceD[fillcolor=ColorK]}{11}% face11 \pst@ifpos(-\rd,-\rc,0){\faceC[fillcolor=ColorL]}{12}%face12 \ifPst@Frame\pst@showFrame\fi% \ifPst@PstPicture\endpspicture\fi% }}\ignorespaces} % \def\psIcosahedron{\pst@object{psIcosahedron}} \def\psIcosahedron@i{{% \pst@killglue% \addbefore@par{fillstyle=solid,radius=1.1547,colorType=A}% \use@par% \def\rb{0.539345}\def\ra{1.41202}% \def\rc{0.539345}\def\rd{1.41202}% \def\Nx{0.381966}\def\Ny{0.381966}\def\Nz{0.381966}% \def\Ox{0.872678}\def\Oy{0.872678}\def\Oz{0.872678}% \def\nx{1}\def\ny{0.381966}\def\nz{0}% \def\ox{1.42102}\def\oy{0.53945}\def\oz{0}% \def\faceA[##1]{\pspolygon[##1](\psk@radius;90)(\psk@radius;210)(\psk@radius;330)} \def\faceB[##1]{\pspolygon[##1](\psk@radius;-90)(\psk@radius;30)(\psk@radius;150)} \def\faceC[##1]{\pspolygon[##1](\psk@radius;-69.0948)(\psk@radius;50.9502)(\psk@radius;170.9502)} \def\faceD[##1]{\pspolygon[##1](\psk@radius;-110.9052)(\psk@radius;9.4598)(\psk@radius;129.4598)} \def\faceE[##1]{\pspolygon[##1](\psk@radius;69.0948)(\psk@radius;189.09498)(\psk@radius;309.09498)} \def\faceF[##1]{\pspolygon[##1](\psk@radius;110.9052)(\psk@radius;230.9052)(\psk@radius;350.9052)} \def\faceG[##1]{\pspolygon[##1](\psk@radius;0)(\psk@radius;120)(\psk@radius;240)} \def\faceH[##1]{\pspolygon[##1](\psk@radius;60)(\psk@radius;180)(\psk@radius;300)} \psscalebox{\psk@@psscale}{% \ifPst@PstPicture\pspicture(-1,-2)(1,2)\fi% \psset[pst-3d]{viewpoint=\psk@platon@Viewpoint}% \pst@ifpos(0,\ra,\rb){\faceA[fillcolor=ColorA]}{1}% face1 \pst@ifpos(0,-\ra,\rb){\faceA[fillcolor=ColorB]}{2}% face2 \pst@ifpos(0,\ra,-\rb){\faceB[fillcolor=ColorC]}{3}% face3 \pst@ifpos(0,-\ra,-\rb){\faceB[fillcolor=ColorD]}{4}% face4 \pst@ifpos(\rc,0,\rd){\faceB[fillcolor=ColorE]}{5}% face5 \pst@ifpos(-\rc,0,\rd){\faceB[fillcolor=ColorF]}{6}% face6 \pst@ifpos(\rc,0,-\rd){\faceA[fillcolor=ColorG]}{7}% face7 \pst@ifpos(-\rc,0,-\rd){\faceA[fillcolor=ColorH]}{8}% face8 \pst@ifpos(\Nx,\Ny,\Nz)[\Ox,\Oy,\Oz]{\faceC[fillcolor=ColorI]}{9}% face9 \pst@ifpos(-\Nx,\Ny,\Nz)[-\Ox,\Oy,\Oz]{\faceD[fillcolor=ColorJ]}{10}% face10 \pst@ifpos(\Nx,-\Ny,\Nz)[\Ox,-\Oy,\Oz]{\faceD[fillcolor=ColorK]}{11}% face11 \pst@ifpos(-\Nx,-\Ny,\Nz)[-\Ox,-\Oy,\Oz]{\faceC[fillcolor=ColorL]}{12}% face12 \pst@ifpos(\Nx,\Ny,-\Nz)[\Ox,\Oy,-\Oz]{\faceE[fillcolor=ColorM]}{13}% face13 \pst@ifpos(\Nx,-\Ny,-\Nz)[\Ox,-\Oy,-\Oz]{\faceF[fillcolor=ColorN]}{14}% face14 \pst@ifpos(-\Nx,-\Ny,-\Nz)[-\Ox,-\Oy,-\Oz]{\faceE[fillcolor=ColorO]}{15}% face15 \pst@ifpos(-\Nx,\Ny,-\Nz)[-\Ox,\Oy,-\Oz]{\faceF[fillcolor=ColorP]}{16}% face16 \pst@ifpos(\nx,\ny,\nz)[\ox,\oy,\oz]{\faceG[fillcolor=ColorQ]}{17}% face17 \pst@ifpos(\nx,-\ny,\nz)[\ox,-\oy,\oz]{\faceH[fillcolor=ColorR]}{18}% face18 \pst@ifpos(-\nx,-\ny,\nz)[-\ox,-\oy,\oz]{\faceG[fillcolor=ColorS]}{19}% face19 \pst@ifpos(-\nx,\ny,\nz)[-\ox,\oy,\oz]{\faceH[fillcolor=ColorT]}{20}% face20 \ifPst@Frame\pst@showFrame\fi% \ifPst@PstPicture\endpspicture\fi% }}\ignorespaces} % \def\pst@showFrame{{% \psset{fillstyle=none,linestyle=dotted}% \ThreeDput[normal=1 0 0](1,0,0){\psframe(-1,-1)(1,1)}% \ThreeDput[normal=0 1 0](0,1,0){\psframe(-1,-1)(1,1)}% \ThreeDput[normal=0 0 1](0,0,1){\psframe(-1,-1)(1,1)}% \ThreeDput[normal=0 0 -1](0,0,-1){\psframe(-1,-1)(1,1)}% \ThreeDput[normal=-1 0 0](-1,0,0){\psframe(-1,-1)(1,1)}% \ThreeDput[normal=0 -1 0](0,-1,0){\psframe(-1,-1)(1,1)}% }} % \endinput