From 52e0e587ff774ec47a088432cdb5738a39fb3739 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 27 Feb 2008 01:41:10 +0000 Subject: new (and special install) pstricks package pst-cox (24feb08) git-svn-id: svn://tug.org/texlive/trunk@6759 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/generic/pst-cox/pst-coxcoor.tex | 374 ++++++++ .../tex/generic/pst-cox/pst-coxeterp.tex | 986 +++++++++++++++++++++ 2 files changed, 1360 insertions(+) create mode 100644 Master/texmf-dist/tex/generic/pst-cox/pst-coxcoor.tex create mode 100644 Master/texmf-dist/tex/generic/pst-cox/pst-coxeterp.tex (limited to 'Master/texmf-dist/tex/generic/pst-cox') diff --git a/Master/texmf-dist/tex/generic/pst-cox/pst-coxcoor.tex b/Master/texmf-dist/tex/generic/pst-cox/pst-coxcoor.tex new file mode 100644 index 00000000000..1cb59e7d978 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pst-cox/pst-coxcoor.tex @@ -0,0 +1,374 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% polygonesCoordinate\pst-coxcoor.tex +% Authors: J.-G. Luque and M. Luque +% Purpose: Library pst-coxcoor.tex +% Created: 02/02/2008 +% License: LGPL +% Project: PST-Cox V1.00 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Copyright © 2008 Jean-Gabriel Luque, Manuel Luque. +% This work may be distributed and/or modified under the condition of +% the Lesser GPL. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% This file is part of PST-Cox V1.00. +% +% PST-Cox V1.00 is free software: you can redistribute it and/or modify +% it under the terms of the Lesser GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% PST-Cox V1.00 is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% Lesser GNU General Public License for more details. +% +% You should have received a copy of the Lesser GNU General Public License +% along with PST-Cox V1.00. If not, see . +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\fileversion{0.98 Beta} +\def\filedate{2008/14/01} + +\message{`Pst-Coxeter-Coordinates' v\fileversion, \filedate\space +(Jean-Gabriel Luque and Manuel Luque)} + +\csname PstCoxeterCoordinatesLoaded\endcsname +\let\PstCoxeterCoordinatesLoaded\endinput +% Require PSTricks and pst-xkey +\ifx\PSTnodeLoaded\endinput\else\input pstricks.tex\fi +\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey.tex\fi +% +% Catcodes changes. +\edef\PstAtCode{\the\catcode`\@} +\catcode`\@=11\relax + +\pst@addfams{pst-coxeter} + %%% Parameter choice. Allows to choice the polytope. To each integer + %%% 080 \typeout{choice < or = 80 and +not `\the\pst@cntg'. Value 1 forced.} \pst@cntg=1 + \fi +\edef\psk@pstCoxeter@choice{#1}} +\psset{choice=1} +% +% +% Graphical parameters +% +% Colors +% Color of Vertices +% Example: \CoxeterCoordinates[colorVertices=blue,choice=5] +\define@key[psset]{pst-coxeter}{colorVertices}{% +\pst@getcolor{#1}\pscolorVertices} +% by default the color of the vertices is green +\psset{colorVertices=green} +% Color of centers +% Example: \CoxeterCoordinates[colorCenters=blue,choice=5] +\define@key[psset]{pst-coxeter}{colorCenters}{% +\pst@getcolor{#1}\pscolorCenters} + \psset{colorCenters=blue} +% Color of centers of the faces +% Example: \CoxeterCoordinates[colorCentersFaces=blue,choice=5] +\define@key[psset]{pst-coxeter}{colorCentersFaces}{% +\pst@getcolor{#1}\pscolorCentersFaces} + \psset{colorCentersFaces=red} +% +% Color of centers of the Cells +% Example: \CoxeterCoordinates[colorCentersCells=blue,choice=5] +\define@key[psset]{pst-coxeter}{colorCentersCells}{% +\pst@getcolor{#1}\pscolorCentersCells} +% by default the color of the centers is red. +\psset{colorCentersCells=magenta} +% +% +% Dot styles +% style of Vertices +% Example: \CoxeterCoordinates[styleVertices=*pentagon,P=5] +\def\psset@styleVertices#1{% +\@ifundefined{psds@#1}% +{\@pstrickserr{styleVertices `#1' not defined}\@eha}% +{\edef\psk@styleVertices{#1}}} +% by default the vertices are represented by a (empty) circle (styleVertices=o) + \psset@styleVertices{o} +% style of Centers +% Example: \CoxeterCoordinates[styleCenters=*pentagon,choice=5] +\def\psset@styleCenters#1{% +\@ifundefined{psds@#1}% +{\@pstrickserr{styleCenters `#1' not defined}\@eha}% +{\edef\psk@styleCenters{#1}}} +% by default the vertices are represented by a disk (styleVertices=*) + \psset@styleCenters{*} +% +% style of Centers of the faces +% Example: \CoxeterCoordinates[styleCentersFaces=*pentagon,choice=5] +% +\def\psset@styleCentersFaces#1{% +\@ifundefined{psds@#1}% +{\@pstrickserr{styleCentersFaces `#1' not defined}\@eha}% +{\edef\psk@styleCentersFaces{#1}}} +% +% by default the centers of the faces are represented by a disk (styleCentersFaces=*) +% + \psset@styleCentersFaces{*} + % style of Centers of the Cells +% Example: \CoxeterCoordinates[styleCentersCells=*pentagon,choice=5] +\def\psset@styleCentersCells#1{% +\@ifundefined{psds@#1}% +{\@pstrickserr{styleCentersCells `#1' not defined}\@eha}% +{\edef\psk@styleCentersCells{#1}}} +% by default the centers of the cells are represented by a disk (stylesCentersCells=*) + \psset@styleCentersCells{*} +% +% +% Dot sizes +% Size of vertices +% Example: \CoxeterCoordinates[sizeVertices=0.1,choice=5] +\newdimen\pssizeVertices +\def\psset@sizeVertices#1{\pssetlength\pssizeVertices{#1}} +\psset@sizeVertices{0.05} +% Sizes of centers +% Example: \CoxeterCoordinates[sizeCenters=0.1,choice=5] +\newdimen\pssizeCenters +\def\psset@sizeCenters#1{\pssetlength\pssizeCenters{#1}} +\psset@sizeCenters{0.05} +% +% Sizes of centers of the faces +% Example: \CoxeterCoordinates[sizeCentersFaces=0.1,choice=5] +% +\newdimen\pssizeCentersFaces +\def\psset@sizeCentersFaces#1{\pssetlength\pssizeCentersFaces{#1}} +\psset@sizeCentersFaces{0.05} +% +% Sizes of centers of the cells +% Example: \CoxeterCoordinates[sizeCentersCells=0.1,choice=5] +% +\newdimen\pssizeCentersCells +\def\psset@sizeCentersCells#1{\pssetlength\pssizeCentersCells{#1}} +\psset@sizeCentersCells{0.05}% +% +\newif\ifPst@drawvertices +\define@key[psset]{pst-coxeter}{drawvertices}[true]{% +\@nameuse{Pst@drawvertices#1}} +% +\newif\ifPst@drawedges +\define@key[psset]{pst-coxeter}{drawedges}[true]{% +\@nameuse{Pst@drawedges#1}} +% +\newif\ifPst@drawcenters +\define@key[psset]{pst-coxeter}{drawcenters}[true]{% +\@nameuse{Pst@drawcenters#1}} +% +% +\newif\ifPst@drawcentersfaces +\define@key[psset]{pst-coxeter}{drawcentersfaces}[false]{% +\@nameuse{Pst@drawcentersfaces#1}} +% +% +\newif\ifPst@drawcenterscells +\define@key[psset]{pst-coxeter}{drawcenterscells}[false]{% +\@nameuse{Pst@drawcenterscells#1}} +% +\psset{drawvertices=true,drawedges=true,drawcenters=true} +% +%% Prologue for postscript +\pstheader{pst-coxeter.pro} +% +% definition if the macro \CoxeterCoordinates +% +\def\CoxeterCoordinates{\pst@object{CoxeterCoordinates}} +\def\CoxeterCoordinates@i{\@ifnextchar[{\CoxeterCoordinates@do}{\CoxeterCoordinates@do[]}} +\def\CoxeterCoordinates@do[#1]{{% +\psset{#1}% +\begin@ClosedObj +\addto@pscode{% +% +% List of the polytopes +% The option choice allows to choice the polytope +% Each values of choice corresponds to a variable cox***datas +% The variables cox***datas are defined in the file pst-coxcoor.pro +% +/choice \the\pst@cntg\space def + choice 1 eq {cox233datas} if + choice 2 eq {cox332datas} if + choice 3 eq {cox333datas} if + choice 4 eq {cox342datas} if + choice 5 eq {cox344datas} if + choice 6 eq {cox343datas} if + choice 7 eq {cox434datas} if + choice 8 eq {cox24333datas} if + choice 9 eq {cox33333datas} if + choice 10 eq {cox33342datas} if + choice 11 eq {cox3333333datas} if + choice 12 eq {cox382datas} if + choice 13 eq {cox283datas} if + choice 14 eq {cox353datas} if + choice 15 eq {cox443datas} if + choice 16 eq {cox432datas} if + choice 17 eq {cox234datas} if + choice 18 eq {cox264datas} if + choice 19 eq {cox462datas} if + choice 20 eq {cox535datas} if + choice 21 eq {cox2103datas} if + choice 22 eq {cox3102datas} if + choice 23 eq {cox253datas} if + choice 24 eq {cox352datas} if + choice 25 eq {cox243datas} if + choice 26 eq {cox23243datas} if + choice 27 eq {cox34232datas} if + choice 28 eq {cox3423232datas} if + choice 29 eq {cox2323243datas} if + choice 30 eq {cox23252datas} if + choice 31 eq {cox25232datas} if + choice 32 eq {cox2323242datas} if + choice 33 eq {cox2423232datas} if + choice 34 eq {cox2324232datas} if + choice 35 eq {cox2323252datas} if + choice 36 eq {cox2523232datas} if + choice 37 eq {cox3523datas} if % + choice 38 eq {cox5525datas} if + choice 39 eq {cox2523datas} if + choice 40 eq {cox3522datas} if + choice 41 eq {cox31032datas} if + choice 42 eq {cox21033datas} if + choice 43 eq {cox3832datas} if + choice 44 eq {cox2833datas} if + choice 45 eq {cox562datas} if + choice 46 eq {cox265datas} if + choice 47 eq {cox4833datas} if + choice 48 eq {cox3834datas} if + choice 49 eq {cox552datas} if + choice 50 eq {cox255datas} if + choice 51 eq {cox51032datas} if + choice 52 eq {cox21035datas} if + choice 53 eq {cox532datas} if + choice 54 eq {cox235datas} if + choice 55 eq {cox542datas} if + choice 56 eq {cox245datas} if +choice 57 eq {cox51033datas} if + choice 58 eq {cox31035datas} if + choice 59 eq {cox543datas} if + choice 60 eq {cox345datas} if +choice 61 eq {cox533datas} if + choice 62 eq {cox335datas} if + choice 63 eq {cox5523datas} if + choice 64 eq {cox3525datas} if + choice 65 eq {cox252232datas} if + choice 66 eq {cox232522datas} if + choice 67 eq {cox252252datas} if + choice 68 eq {cox252522datas} if + choice 69 eq {cox263datas} if + choice 70 eq {cox362datas} if + choice 71 eq {cox25223232datas} if + choice 72 eq {cox23232522datas} if + choice 73 eq {cox23252252datas} if + choice 74 eq {cox23252522datas} if + choice 75 eq {cox25223252datas} if + choice 76 eq {cox25225232datas} if + choice 77 eq {cox25232522datas} if + choice 78 eq {cox25252232datas} if + choice 79 eq {cox25252252datas} if + choice 80 eq {cox252252522datas} if + %%% <-- add new polytope here + 0 0 translate + %%% Usefull definitions +/pscolorVertices {\pst@usecolor\pscolorVertices currentrgbcolor} def +/pscolorCenters {\pst@usecolor\pscolorCenters currentrgbcolor} def + /pscolorCentersFaces {\pst@usecolor\pscolorCentersFaces currentrgbcolor} def + /pscolorCentersCells {\pst@usecolor\pscolorCentersCells currentrgbcolor} def +/unit \pst@number\psunit\space def % pts -> cm +/unit \pst@number\psunit\space def % pts -> cm +1 setlinejoin + %%%% Drawing the edges +\ifPst@drawedges + 0 1 NbrEdges 1 sub { % from 0 to nbedges-1 (draw all the edges) + /CompteurVertices ED + /CompteurIntermediaireSommets CompteurVertices NbrVerticesInAnEdge mul + def +newpath ListePoints CompteurIntermediaireSommets get aload pop + /Y exch def /X exch def + X unit mul Y unit mul moveto +1 1 NbrVerticesInAnEdge 1 sub { % from 1 to nbvertices in an edge -1 + /CompteurEdges ED +ListePoints CompteurIntermediaireSommets CompteurEdges add get aload +pop + /Y exch def /X exch def + X unit mul Y unit mul lineto + } + for +closepath stroke } for \fi % + %%%% Drawing of the Vertices +/DS \pst@number\pssizeVertices\space def +\@nameuse{psds@\psk@styleVertices}% +\ifPst@drawvertices +% We draw all the vertices of all edges +0 1 NbrEdges NbrVerticesInAnEdge mul 1 sub { % From 0 to nbEdges*NbVerticesInEdges-1 +/CompteurEdges ED + ListePoints CompteurEdges get aload pop + /Y exch def /X exch def + pscolorVertices + X unit mul Y unit mul + Dot + stroke +} for + \fi +% +% Drawing of the Centers of the Faces +% +/DS \pst@number\pssizeCentersFaces\space def +\@nameuse{psds@\psk@styleCentersFaces}% +\ifPst@drawcentersfaces +0 1 NbrFaces 1 sub{ % from 0 to NbrFaces-1 +/CompteurFaces ED + ListeFaces CompteurFaces get aload pop + /Y exch def /X exch def + pscolorCentersFaces + X unit mul Y unit mul + Dot + stroke +} for + \fi +% +% Drawing the centers of the Cells +% +/DS \pst@number\pssizeCentersCells\space def +\@nameuse{psds@\psk@styleCentersCells}% +\ifPst@drawcenterscells +0 1 NbrCells 1 sub{ % from 0 to nbCells-1 +/CompteurCells ED + ListeCells CompteurCells get aload pop + /Y exch def /X exch def + pscolorCentersCells + X unit mul Y unit mul + Dot + stroke +} for \fi +% +% Drawing the centers of the Edges +% + /DS \pst@number\pssizeCenters\space def +\@nameuse{psds@\psk@styleCenters}% +\ifPst@drawcenters +0 1 NbrEdges 1 sub { % from 0 to NbrEdges -1 + /CompteurVertices ED + /CompteurIntermediaireSommets CompteurVertices NbrVerticesInAnEdge mul + def + /XM 0 def /YM 0 def +0 1 NbrVerticesInAnEdge 1 sub { % + /CompteurEdges ED + ListePoints CompteurEdges CompteurIntermediaireSommets add get aload pop + /Y ED /X ED + /XM XM X add def + /YM YM Y add def + } + for + pscolorCenters + XM NbrVerticesInAnEdge div unit mul YM NbrVerticesInAnEdge div unit mul %1.5 0 360 arc + Dot + stroke +} for \fi +}% +\end@ClosedObj +}} +\catcode`\@=\PstAtCode\relax +\endinput +%% +%% END: pst-coxeter3.tex diff --git a/Master/texmf-dist/tex/generic/pst-cox/pst-coxeterp.tex b/Master/texmf-dist/tex/generic/pst-cox/pst-coxeterp.tex new file mode 100644 index 00000000000..32cccc28889 --- /dev/null +++ b/Master/texmf-dist/tex/generic/pst-cox/pst-coxeterp.tex @@ -0,0 +1,986 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% pst-coxeter_parameter\pst-coxeterp.tex +% Authors: J.-G. Luque and M. Luque +% Purpose: Listing of the macros of pst-coxeterp +% Created: 02/02/2008 +% License: LGPL +% Project: PST-Cox V1.00 +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Copyright © 2008 Jean-Gabriel Luque, Manuel Luque. +% This work may be distributed and/or modified under the condition of +% the Lesser GPL. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% This file is part of PST-Cox V1.00. +% +% PST-Cox V1.00 is free software: you can redistribute it and/or modify +% it under the terms of the Lesser GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. +% +% PST-Cox V1.00 is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% Lesser GNU General Public License for more details. +% +% You should have received a copy of the Lesser GNU General Public License +% along with PST-Cox V1.00. If not, see . +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\fileversion{0.98 Beta} +\def\filedate{2008/21/01} + +\message{`pst-Coxeter-parameter' v\fileversion, \filedate\space +(Jean-Gabriel Luque and Manuel Luque)} + +\csname PstCoxeterLoaded\endcsname +\let\PstCoxeter\endinput +% Require PSTricks and pst-xkey +\ifx\PSTnodeLoaded\endinput\else\input pstricks.tex\fi +\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey.tex\fi +% +% Catcodes changes. +\edef\PstAtCode{\the\catcode`\@} +\catcode`\@=11\relax +% +%define the family of parameters pst-coxeter-parameter +% +\pst@addfams{pst-coxeter-parameter} +% +% There is two parameters P and Q which encodes the angle +% between the mirrors. The parameter P is used for the regular polygons +% the polytopes gamma^p_n, beta^p_n, gamma^p_2 and beta^p_2 +% Example: \Polygon[P=5] +% +\define@key[psset]{pst-coxeter-parameter}{P}{% +\edef\psk@pstCoxeter@P{#1}} +% +\psset{P=6} +% +% The parameter Q is used for starry regular polygon. +% Example: \Polygon[P=5,Q=2] +% +\define@key[psset]{pst-coxeter-parameter}{Q}{% +\edef\psk@pstCoxeter@Q{#1}} +% +% +\psset{Q=1} +% +% The dimension is used for simplices, polytopes gamma^p_n and beta^p_n +% Example: \Simplex[dimension=4] +% +\define@key[psset]{pst-coxeter-parameter}{dimension}{% +\edef\psk@pstCoxeter@dimension{#1}} +\psset{dimension=3} +% +% Graphical parameters +% +% Colors +% Color of Vertices +% Example: \Polygon[colorVertices=blue,P=5] +\define@key[psset]{pst-coxeter-parameter}{colorVertices}{% +\pst@getcolor{#1}\pscolorVertices} +% by default the color of the vertices is green +\psset{colorVertices=green} +% Color of centers +% Example: \Polygon[colorCenters=blue,P=5] +\define@key[psset]{pst-coxeter-parameter}{colorCenters}{% +\pst@getcolor{#1}\pscolorCenters} +% +% by default the color of the centers is red. +\psset{colorCenters=red} +% +% +% Dot styles +% style of Vertices +% Example: \Polygon[styleVertices=*pentagon,P=5] +\def\psset@styleVertices#1{% +\@ifundefined{psds@#1}% +{\@pstrickserr{styleVertices `#1' not defined}\@eha}% +{\edef\psk@styleVertices{#1}}} +% by default the vertices are represented by a (empty) circle (styleVertices=o) + \psset@styleVertices{o} +% style of Centers +% Example: \Polygon[styleCenters=*pentagon,P=5] +\def\psset@styleCenters#1{% +\@ifundefined{psds@#1}% +{\@pstrickserr{styleCenters `#1' not defined}\@eha}% +{\edef\psk@styleCenters{#1}}} +% by default the vertices are represented by a disk (styleVertices=*) + \psset@styleCenters{*} +% +% Dot sizes +% Size of vertices +% Example: \Polygon[sizeVertices=0.1,P=5] +\newdimen\pssizeVertices +\def\psset@sizeVertices#1{\pssetlength\pssizeVertices{#1}} +\psset@sizeVertices{0.05} +% Sizes of centers +% Example: \Polygon[sizeCenters=0.1,P=5] +\newdimen\pssizeCenters +\def\psset@sizeCenters#1{\pssetlength\pssizeCenters{#1}} +\psset@sizeCenters{0.05} +% +% Boolean parameters +% +% The vertices are drawn only if the value of drawvertices is true +% Examples: \Polygon[drawvertices=false,P=5] + +\newif\ifPst@drawvertices +\define@key[psset]{pst-coxeter-parameter}{drawvertices}[true]{% +\@nameuse{Pst@drawvertices#1}} +% +% The edges are drawn only if the value of drawedges is true +% Examples: \Polygon[drawedges=false,P=5] +% +\newif\ifPst@drawedges +\define@key[psset]{pst-coxeter-parameter}{drawedges}[true]{% +\@nameuse{Pst@drawedges#1}} +% +%% +% The centers are drawn only if the value of drawcenters is true +%% Examples: \Polygon[drawcenters=false,P=5] +% +\newif\ifPst@drawcenters +\define@key[psset]{pst-coxeter-parameter}{drawcenters}[true]{% +\@nameuse{Pst@drawcenters#1}} +% +% By default the vertices, edges and centers are drawn. +% +%\setkeys{psset}{drawvertices=true,drawedges=true,drawcenters=true} +\psset{drawvertices=true,drawedges=true,drawcenters=true} +% +% All the polytopes are encoded with the same way. +% For each kind of polytope, we have wrote three procedures: +% /drawVertices which allows to draw the vertices of the polytope +% /drawEdges which allows to draw the edges of the polytope +% /drawCenter which allows to draw the centers of the edges of the polytope +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%% LIST OF THE POLYTOPES +%% +% Regular real polygons +% +% +% It is a well known family of polytope with two parameters P and Q. +% This is the set of the classical polygons whose symmetric groups are dihedral 2[p]2. +% Use the macro \Polygon[P=p,Q=q] draw the polygon 2{p/q}2 in the notation of Coxeter. +% The non starry real polygons are obtained when Q=1 +% The starry polygon are obtained when Q do not divided P +% +% Example: +% \Polygon[P=5] draw a pentagone +% \Polygon[P=5,Q=2] draw a regular star with five vertices. +\def\Polygon{\pst@object{Polygon}} +\def\Polygon@i{\@ifnextchar[{\Polygon@do}{\Polygon@do[]}} +\def\Polygon@do[#1]{{% +\pst@killglue +\setkeys{psset}{#1}% +\begin@ClosedObj +\addto@pscode{% +%%%% macro for the colors of the vertices and the centers +/pscolorVertices {\pst@usecolor\pscolorVertices currentrgbcolor} def +/pscolorCenters {\pst@usecolor\pscolorCenters currentrgbcolor} def + 0 0 translate +%%% some usefull definition +/unit \pst@number\psunit\space def % pts -> cm +/Pi 180 def %%% use Pi instead of 180° +/p \psk@pstCoxeter@P\space def % parameter P +/q \psk@pstCoxeter@Q\space def % parameter Q +/p_1 p 1 sub def % p-1 +1 setlinejoin CLW setlinewidth% +%%%%% List of the vertices +%%%%% + /TableauxPoints [ +0 1 p 1 add {% + /n exch def + [ + 2 n Pi q mul mul mul p div cos % cos(2nqPi/p) + unit mul % pts to cm + 2 n Pi q mul mul mul p div sin % sin(2nPi/p) + unit mul % pts to cm + ] + } for +] def +% +% +%%%% Procedures +% +% /drawEdges: this procedure draws the edges +% +/drawEdges { 0 1 p { + /n exch def + TableauxPoints n get aload pop + /YL ED /XL ED + XL YL moveto % move to the point n of the array + TableauxPoints n 1 add get aload pop + lineto % draw a line from the point n to the point n+1 + stroke + } for +} def \ifPst@drawedges + drawEdges + stroke +\fi + %%%%%%%%%%%%%%%%%% + % /drawVertices:this procedure draw the vertices + % + % +/DS \pst@number\pssizeVertices\space def +\@nameuse{psds@\psk@styleVertices}% +/drawVertices {% + /Liste exch def + 0 1 p { + /compteur exch def + pscolorVertices + Liste compteur get aload pop + Dot + } for +} def \ifPst@drawvertices + TableauxPoints drawVertices +\fi + %%%%%%%%%%%%%% +% /drawCenters : draw the centers of the edges +% +/DS \pst@number\pssizeCenters\space def +\@nameuse{psds@\psk@styleCenters}% +/drawCenters { + 0 1 p { + /n exch def + TableauxPoints n get aload pop + /YL ED /XL ED + TableauxPoints n 1 add get aload pop + /YR ED /XR ED + /YM YL YR add 2 div def % YM = (YL+YR)/2 + /XM XL XR add 2 div def % XM = (XL+XR)/2 + pscolorCenters + XM YM + Dot + stroke +}for + } def +\ifPst@drawcenters + drawCenters +\fi +}% +\end@ClosedObj +}} +% +%%%%%%%%%%%%%%%%%%% The simplices +% Simplices are the real regular polytopes whose +% roots system is A_{n+1}. The reflection groups which generates +% it is the symmetric group (order (n+1)!). +% Simplices are auto-reciprocal polytopes. The first examples are the tetrahedral (for dimension 2), +% the pentatope (in dimension 4), the sextatope in dimension 5 etc. +% In general the number of cells of dimension m ($m cm +/Pi 180 def +/p \psk@pstCoxeter@dimension\space 1 add def % dimension of the space plus 1 +/p_1 p 1 sub def % dimension of the space +1 setlinejoin CLW setlinewidth% +%%%% Computation if the array of the Vertices + /TableauxPoints [ +0 1 p 1 add {% for n from 0 to p+1 + /n exch def + 1 1 p 1 sub{ % for m from 1 to p+1 + /m exch def + [ + 2 n Pi mul mul p div cos % cos(2nPi/p) + unit mul % pts to cm + 2 n Pi mul mul p div sin % sin(2nPi/p) + unit mul % pts to cm + ] + [ + 2 n m add Pi mul mul p div cos % cos(2nPi/p) + unit mul % pts to cm + 2 n m add Pi mul mul p div sin % sin(2nPi/p) + unit mul % pts to cm + ] + }for + } for +] def +% +%%%%%% Procedure +% /drawEdges : draw the edges of the simplex +% One use the array TableauxPoints +/drawEdges { 0 1 p p mul { % for n from 0 to p^2 + /n exch def + TableauxPoints n 2 mul get aload pop % the point 2n of the array + /YL ED /XL ED + XL YL moveto + TableauxPoints n 2 mul 1 add get aload pop % the point 2n+1 of the array + lineto + stroke + } for +} def \ifPst@drawedges + drawEdges + stroke +\fi +% +% /drawVertices : draw the vertices of the simplex +% +/DS \pst@number\pssizeVertices\space def% define the size of the dots +\@nameuse{psds@\psk@styleVertices}% style of the dots +/drawVertices {% + /Liste exch def + 0 1 p p mul { % for compteur from 0 to p^2 + /compteur exch def + pscolorVertices % color of the parameters colorVertices + Liste compteur get aload pop + Dot % draw a dot + } for +} def \ifPst@drawvertices + TableauxPoints drawVertices % apply drawVertices to TableauxPoints +\fi +% +% /drawCenters : draw the centers of the simplex +% +/DS \pst@number\pssizeCenters\space def % define the size of the dots +\@nameuse{psds@\psk@styleCenters}% style of the dots +/drawCenters { + 0 1 p p mul { % from n from 0 to p^2 + /n exch def + TableauxPoints n 2 mul get aload pop % point $2n$ of TableauxPoints + /YL ED /XL ED + TableauxPoints n 2 mul 1 add get aload pop % point $2n+1$ of TableauxPoints + /YR ED /XR ED + /YM YL YR add 2 div def % YM:=(YL+YZ)/2 + /XM XL XR add 2 div def % XM:=(XY+XZ)/2 + pscolorCenters + XM YM + Dot + stroke +}for + } def +\ifPst@drawcenters + drawCenters +\fi +} +\end@ClosedObj +}} +% +%%%%%%%%%%%%%%%%%% The polytopes $\gamma^p_n$ +% These polytopes are complex polytopes $p\{4\}2\{3\}2\dots 2\{3\}2$ in the notation of Coxeter. +% This means that their symmetric group is a $n!p$ order group generated by $n$ reflections +% with relations $R_1^p=R_2^2=\dots R_n^2=Id$ +% $R_1R_2R_1R_2=R_2R_1R_2R_1$, $R_iR_{i+1}R_i=R_{i+1}R_i$ if i>1, $R_iR_j=R_jR_i$ if $|i-j|>1$. +% Such a complex polytope has $\left(n\atop m\right)p^n$ cells of dimension $m$ ($m2$, the polytope is not a real polytope since $R_1^2\neq Id$. +% In this case, the edges are regular polygons with $p$ vertices. +% When $n=2$, the projection is not convenient since the projection of some vertices are the same. +% For an other projection, use the macro \gammaptwo described below. +% +% The two parameters are the dimension and $p$. +% +% Use the macro \gammapn[dimension=...,P=...] to draw the projection of a polytope $\gamma^p_n$. +% +% Example : \gammapn[dimension=5,P=4] +% +\def\gammapn{\pst@object{gammapn}} +\def\gammapn@i{\@ifnextchar[{\gammapn@do}{\gammapn@do[]}} +\def\gammapn@do[#1]{{% +\pst@killglue +\setkeys{psset}{#1}% +\begin@ClosedObj +\addto@pscode{% +%%% Some usefull definitions +/pscolorVertices {\pst@usecolor\pscolorVertices currentrgbcolor} def + /pscolorCenters {\pst@usecolor\pscolorCenters currentrgbcolor} def +0 0 translate +/unit \pst@number\psunit\space def % pts -> cm +/Pi 180 def +/p \psk@pstCoxeter@P\space def % parameter p +%/p 3 def +/n \psk@pstCoxeter@dimension\space def% dimension +/n_1 n 1 sub def % n-1 +/p_1 p 1 sub def % p-1 +1 setlinejoin CLW setlinewidth% +% +% +% The procedures +% +% /drawEdges : draw the edges of the polytopes +/drawEdges { /pow2 1 def + 1 1 n_1 {/pop %for from 1 to n-1 + /pow2 pow2 p mul def% + } for % compute p^{n-1} +% + 1 1 n {% for i from 1 to n + /i exch def + 0 1 pow2 1 sub { % for j from 0 to p^{n-1}-1 + /j exch def + /num j def % num := j + /s1 0 def % s1 := 0 + /s2 0 def % s2 := 0 + 1 1 i 1 sub {% for k from 1 to i-1 + /k exch def + /c unit k n num mul add 2 Pi mul mul p div n div cos mul def% c := cos( (p*num+k)*2*Pi/p/n)*unit + /s unit k n num mul add 2 Pi mul mul p div n div sin mul def% s := sin( (p*num+k)*2*Pi/p/n)*unit + /s1 s1 c add def %s1 := s1+c + /s2 s2 s add def %s2 := s2+s + /num num p idiv def % num := num/p + } for + i 1 add 1 n {% for k from i+1 to n + /k exch def + /c unit k n num mul add 2 Pi mul mul p div n div cos mul def% c := cos( (p*num+k)*2*Pi/p/n)*unit + /s unit k n num mul add 2 Pi mul mul p div n div sin mul def% s := sin( (p*num+k)*2*Pi/p/n)*unit + /s1 s1 c add def %s1 := s1+c + /s2 s2 s add def %s2 := s2+s + /num num p idiv def % num := num/p + } for + /x unit i 2 Pi mul mul p div n div cos mul s1 add def %x := s1+unit*cos(2*i*Pi/p/n) + /y unit i 2 Pi mul mul p div n div sin mul s2 add def %y := s2+unit*sin(2*i*Pi/n) + x y moveto % + 0 1 p { % from jj from 0 to p + /jj exch def + /x unit i jj n mul add 2 Pi mul mul n div p div cos mul s1 add def %x := s1+unit*cos((i+jj*n)*Pi*2/p/n) + /y unit i jj n mul add 2 Pi mul mul n div p div sin mul s2 add def %y := s2+unit*sin((i+jj*n)*Pi*2/p/n) + x y lineto + } for + stroke +}for + } for + stroke +} def \ifPst@drawedges + drawEdges + stroke +\fi +% +% \drawVertices : draw the vertices of the polytopes +% +% Almost the same procedure than \drawEdges +/DS \pst@number\pssizeVertices\space def +\@nameuse{psds@\psk@styleVertices}% +/drawVertices {% + /pow2 1 def + 1 1 n_1 {/pop + /pow2 pow2 p mul def% + } for +% + 1 1 n {% + /i exch def + 0 1 pow2 1 sub { % for j from 0 to p^{n-1}-1 + /j exch def + /num j def + /s1 0 def + /s2 0 def + 1 1 i 1 sub {% for k from 1 to i-1 + /k exch def + /c unit k n num mul add 2 Pi mul mul p div n div cos mul def% cos( (p*num+k)*2*Pi/p/n)*unit + /s unit k n num mul add 2 Pi mul mul p div n div sin mul def% sin( (p*num+k)*2*Pi/p/n)*unit + /s1 s1 c add def %s1=s1+c + /s2 s2 s add def %s2=s2+s + /num num p idiv def % num:=num/p + } for + i 1 add 1 n {% for k from i+1 to n + /k exch def + /c unit k n num mul add 2 Pi mul mul p div n div cos mul def% cos( (p*num+k)*2*Pi/p/n)*unit + /s unit k n num mul add 2 Pi mul mul p div n div sin mul def% sin( (p*num+k)*2*Pi/p/n)*unit + /s1 s1 c add def %s1=s1+c + /s2 s2 s add def %s2=s2+s + /num num p idiv def % num:=num/p + } for + /x unit i 2 Pi mul mul p div n div cos mul s1 add def %x:=s1+unit*cos(2*i*Pi/p/n) + /y unit i 2 Pi mul mul p div n div sin mul s2 add def + pscolorVertices + x y + Dot + 0 1 p { % for jj from 0 to p + /jj exch def + /x unit i jj n mul add 2 Pi mul mul n div p div cos mul s1 add def%x:=s1+unit*cos((i+jj*n)*Pi*2/p/n) + /y unit i jj n mul add 2 Pi mul mul n div p div sin mul s2 add def + pscolorVertices + x y + Dot + } for + stroke +}for + } for + stroke +} def \ifPst@drawvertices + %Tableaaux + drawVertices +\fi +% +% \drawCenters : draw the centers of the edges of the polytopes +% +% Almost the same procedure than \drawEdges +/DS \pst@number\pssizeCenters\space def +\@nameuse{psds@\psk@styleCenters}% +/drawCenters { + /pow2 1 def + 1 1 n_1 {/pop + /pow2 pow2 p mul def% + } for +% + 1 1 n {% + /i exch def + 0 1 pow2 1 sub { % for j from 0 to p^{n-1}-1 + /j exch def + /num j def + /s1 0 def + /s2 0 def + 1 1 i 1 sub {% for k from 1 to i-1 + /k exch def + /c unit k n num mul add 2 Pi mul mul p div n div cos mul def% cos( (p*num+k)*2*Pi/p/n)*unit + /s unit k n num mul add 2 Pi mul mul p div n div sin mul def% sin( (p*num+k)*2*Pi/p/n)*unit + /s1 s1 c add def %s1=s1+c + /s2 s2 s add def %s2=s2+s + /num num p idiv def % num:=num/p + } for + i 1 add 1 n {% for k from i+1 à n + /k exch def + /c unit k n num mul add 2 Pi mul mul p div n div cos mul def% cos( (p*num+k)*2*Pi/p/n)*unit + /s unit k n num mul add 2 Pi mul mul p div n div sin mul def% sin( (p*num+k)*2*Pi/p/n)*unit + /s1 s1 c add def %s1=s1+c + /s2 s2 s add def %s2=s2+s + /num num p idiv def % num:=num/p + } for + /x unit i 2 Pi mul mul p div n div cos mul s1 add def %x:=s1+unit*cos(2*i*Pi/p/n) + /y unit i 2 Pi mul mul p div n div sin mul s2 add def + 1 1 p 1 sub { % for jj from 1 to p-1 + /jj exch def + /x unit i jj n mul add 2 Pi mul mul n div p div cos mul s1 add x add def%x:=s1+unit*cos((i+jj*n)*Pi*2/p/n) + /y unit i jj n mul add 2 Pi mul mul n div p div sin mul s2 add y add def + } for + /x x p 0 add div def + /y y p 0 add div def + pscolorCenters + x y + Dot + stroke +}for + } for + stroke + } def +\ifPst@drawcenters + drawCenters +\fi } +\end@ClosedObj +}} +% +%%%%%%%%%%%%%%%%%% The polytopes $\beta^p_n$ +% These polytopes are complex polytopes $2\{3\}2\{3\}2\dots 2\{4\}p$ in the notation of Coxeter. +% They are the reciprocal polytopes of $\gamma^p_n$ +% When $p=2$, the polytope $\beta^2_n$ is an hyperoctaedre. +% When $n=2$, the projection is not convenient since the projection of some vertices are the same. +% For an other projection, use the macro \betaptwo described below. +% +% The two parameters are the dimension and $p$. +% +% Use the macro \betapn[dimension=...,P=...] to draw the projection of a polytope $\beta^p_n$. +% +% Example : \betapn[dimension=5,P=4] +%% +% +% +\def\betapn{\pst@object{betapn}} +\def\betapn@i{\@ifnextchar[{\betapn@do}{\betapn@do[]}} +\def\betapn@do[#1]{{% +\pst@killglue +\setkeys{psset}{#1}% +\begin@ClosedObj +\addto@pscode{% +% Some useful definitions +/pscolorVertices {\pst@usecolor\pscolorVertices currentrgbcolor} def + /pscolorCenters {\pst@usecolor\pscolorCenters currentrgbcolor} def +0 0 translate +/unit \pst@number\psunit\space def % pts -> cm +/Pi 180 def +/p \psk@pstCoxeter@P\space def % parameter +%/p 3 def +/n \psk@pstCoxeter@dimension\space def% dimension +/n_1 n 1 sub def % n-1 +/p_1 p 1 sub def % p-1 +1 setlinejoin CLW setlinewidth% + /TableauxPoints [ +] def +% +%%%%% The procedures +% % /drawEdges : draw the edges of the polytopes + /drawEdges { + 0 1 n { % for k from 0 to n + /k exch def + k 1 add 1 n{ % for l from k+1 to n + /l exch def + 0 1 p { % for i from 0 to p + /i exch def + 0 1 p { % for j from 0 to p + /j exch def + /s1 unit n i mul k add 2 Pi mul mul n div p div cos mul def % s1 := unit*cos(2*Pi*(n*i)+k)/n/p) + /s2 unit n i mul k add 2 Pi mul mul n div p div sin mul def % s2 := unit*sin(2*Pi*(n*i)+k)/n/p) + /s3 unit n j mul 1 k add add 2 Pi mul mul n div p div cos mul def % s3 := unit*cos(2*Pi*(n*j)+k)/n/p) + /s4 unit n j mul 1 k add add 2 Pi mul mul n div p div sin mul def % s4 := unit*sin(2*Pi*(n*j)+k)/n/p) + s1 s2 moveto + s3 s4 lineto + stroke + }for + }for + } for + }for + } def \ifPst@drawedges + drawEdges + stroke +\fi +% +% \drawVertices : draw the vertices of the polytopes +% +% Almost the same procedure than \drawEdges +/DS \pst@number\pssizeVertices\space def +\@nameuse{psds@\psk@styleVertices}% +/drawVertices {% + 0 1 n { + /k exch def + k 1 add 1 n{ + /l exch def + 0 1 p 0 sub { + /i exch def + 0 1 p 0 sub { + /j exch def + /s1 unit n i mul k add 2 Pi mul mul n div p div cos mul def + /s2 unit n i mul k add 2 Pi mul mul n div p div sin mul def + /s3 unit n j mul 1 k add add 2 Pi mul mul n div p div cos mul def + /s4 unit n j mul 1 k add add 2 Pi mul mul n div p div sin mul def + pscolorVertices + s1 s2 %radiusVertices 0 360 arc + Dot + %0 1 0 setrgbcolor % green + %pscolorVertices + % fill + s3 s4 %radiusVertices 0 360 arc + Dot + %0 1 0 setrgbcolor % green + %pscolorVertices + %fill + stroke + }for + }for + } for + }for +} def \ifPst@drawvertices + drawVertices +\fi +% +% \drawCenters : draw the vertices of the polytopes +% +% Almost the same procedure than \drawCenters +/DS \pst@number\pssizeCenters\space def +\@nameuse{psds@\psk@styleCenters}% +/drawCenters { + 0 1 n { + /k exch def + k 1 add 1 n{ + /l exch def + 0 1 p 0 sub { + /i exch def + 0 1 p 0 sub { + /j exch def + /s1 unit n i mul k add 2 Pi mul mul n div p div cos mul def + /s2 unit n i mul k add 2 Pi mul mul n div p div sin mul def + /s3 unit n j mul 1 k add add 2 Pi mul mul n div p div cos mul def + /s4 unit n j mul 1 k add add 2 Pi mul mul n div p div sin mul def + pscolorCenters + %newpath + s1 s3 add 2 div s2 s4 add 2 div %1.5 0 360 arc + %closepath + Dot + %1 0 0 setrgbcolor % red + stroke + }for + }for + } for + }for + } def \ifPst@drawcenters + drawCenters +\fi +}% +\end@ClosedObj +}} +% +% %%%%% Polygon $\gamma^p_2$ +% A special projection for polytopes $\gamma^p_2$. +% +\def\gammaptwo{\pst@object{gammaptwo}} +\def\gammaptwo@i{\@ifnextchar[{\gammaptwo@do}{\gammaptwo@do[]}} +\def\gammaptwo@do[#1]{{% +\pst@killglue +\setkeys{psset}{#1}% +\begin@ClosedObj +\addto@pscode{% +/pscolorVertices {\pst@usecolor\pscolorVertices currentrgbcolor} def + /pscolorCenters {\pst@usecolor\pscolorCenters currentrgbcolor} def +0 0 translate +/unit \pst@number\psunit\space def % pts -> cm +/Pi 180 def +/p \psk@pstCoxeter@P\space def % parameter +/p_1 p 1 add def % p+1 +1 setlinejoin CLW setlinewidth +% list of the vertices +/TableauxPointsL [ +0 1 p_1 {% for n from 0 to p-1 + /n exch def +0 1 p { % for n from 0 to p + /i exch def + [ + 2 n Pi mul mul p div cos 7.5 sin mul % cos(2nPi/p)sin(Pi/24) + 2 n Pi mul mul p div sin 7.5 cos mul add % +sin(2nPi/p)cos(Pi/24) + 2 i Pi mul mul p div cos 7.5 sin mul sub % -cos(2iPi/p)sin(Pi/24) + 2 i Pi mul mul p div sin 7.5 cos mul sub % -sin(2iPi/p)cos(Pi/24) + % + unit mul % pts to cm + 2 n Pi mul mul p div cos 7.5 cos mul % cos(2nPi/p)cos(Pi/24) + 2 n Pi mul mul p div sin 7.5 sin mul sub % -sin(2nPi/p)sin(Pi/24) + 2 i Pi mul mul p div cos 7.5 cos mul add % +cos(2iPi/p)cos(Pi/24) + 2 i Pi mul mul p div sin 7.5 sin mul sub % -sin(2iPi/p)sin(Pi/24) + unit mul % pts to cm + ] + } for + } for +] def +% +/TableauxPointsR [ +0 1 p_1 {%for n from 0 to p-1 + /n exch def +0 1 p {% for i from 0 to p + /i exch def + [ + 2 i Pi mul mul p div cos 7.5 sin mul % cos(2iPi/p)sin(Pi/24) + 2 i Pi mul mul p div sin 7.5 cos mul add % +sin(2iPi/p)cos(Pi/24) + 2 n Pi mul mul p div cos 7.5 sin mul sub % -cos(2nPi/p)sin(Pi/24) + 2 n Pi mul mul p div sin 7.5 cos mul sub % -sin(2nPi/p)cos(Pi/24) + unit mul % pts to cm + % + 2 i Pi mul mul p div cos 7.5 cos mul % cos(2iPi/p)cos(Pi/24) + 2 i Pi mul mul p div sin 7.5 sin mul sub % -sin(2iPi/p)sin(Pi/24) + 2 n Pi mul mul p div cos 7.5 cos mul add % +cos(2nPi/p)cos(Pi/24) + 2 n Pi mul mul p div sin 7.5 sin mul sub % -sin(2nPi/p)sin(Pi/24) + unit mul % pts to cm + ] + } for + } for +] def + %%%% The procedures + % + % / drawEdges draw the edges of the polygon +/drawEdges { + /Liste exch def +newpath + Liste 0 get aload pop moveto + 0 1 p_1 p mul { + /compteur exch def + Liste compteur get aload pop + lineto } for +closepath stroke } def \ifPst@drawedges + TableauxPointsL drawEdges + TableauxPointsR drawEdges +\fi +% + % / drawVertices draw the vertices of the polygon +/DS \pst@number\pssizeVertices\space def +\@nameuse{psds@\psk@styleVertices}% +/drawVertices {% + /Liste exch def + 0 1 p_1 p mul { + /compteur exch def + pscolorVertices + Liste compteur get aload pop + Dot + pscolorVertices + fill + } for +} def \ifPst@drawvertices + TableauxPointsL drawVertices + TableauxPointsR drawVertices +\fi + %% List of the centers +/TableauMilieuxL[ +0 1 p 1 sub {% for n from 0 to p-1 + /n exch def + [ + 2 n Pi mul mul p div cos 7.5 sin mul % cos(2nPi/p)sin(Pi/24) + 2 n Pi mul mul p div sin 7.5 cos mul add % +sin(2nPi/p)cos(Pi/24) + unit mul % pts to cm + 2 n Pi mul mul p div cos 7.5 cos mul % cos(2nPi/p)cos(Pi/24) + 2 n Pi mul mul p div sin 7.5 sin mul sub % -sin(2nPi/p)sin(Pi/24) + unit mul % pts to cm + ] + } for +] def +% +/TableauMilieuxR[ +0 1 p 1 sub {% for n from 0 to p-1 + /n exch def + [ + 2 n Pi mul mul p div cos 7.5 sin mul neg % -cos(2nPi/p)sin(Pi/24) + 2 n Pi mul mul p div sin 7.5 cos mul sub % -sin(2nPi/p)cos(Pi/24) + unit mul % pts to cm + 2 n Pi mul mul p div cos 7.5 cos mul % cos(2nPi/p)cos(Pi/24) + 2 n Pi mul mul p div sin 7.5 sin mul sub % -sin(2nPi/p)sin(Pi/24) + unit mul % pts to cm + ] + } for +] def +% + % / drawEdges draw the edges of the polygon +/DS \pst@number\pssizeCenters\space def +\@nameuse{psds@\psk@styleCenters}% +/drawCenters {% + /Liste exch def + 0 1 p 1 sub {% + /compteur exch def + pscolorCenters + Liste compteur get aload pop + Dot + stroke + } for +} def \ifPst@drawcenters + TableauMilieuxL drawCenters + TableauMilieuxR drawCenters +\fi +}% +\end@ClosedObj +}} +% +% +% %%%%% Polygon $\gamma^p_2$ +% A special projection for polytopes $\gamma^p_2$. +% +% +\def\betaptwo{\pst@object{betaptwo}} +\def\betaptwo@i{\@ifnextchar[{\betaptwo@do}{\betaptwo@do[]}} +\def\betaptwo@do[#1]{{% +\pst@killglue +\setkeys{psset}{#1}% +\begin@ClosedObj +\addto@pscode{% +/pscolorVertices {\pst@usecolor\pscolorVertices currentrgbcolor} def + /pscolorCenters {\pst@usecolor\pscolorCenters currentrgbcolor} def +0 0 translate +/unit \pst@number\psunit\space def % pts -> cm +/Pi 180 def +/p \psk@pstCoxeter@P\space def % parameter +/p_1 p 1 sub def % p-1 +1 setlinejoin CLW setlinewidth +% List of the vertices + /TableauxPointsL24p [ +0 1 p_1 {% for n from 0 to p-1 + /n exch def + [ + 2 n Pi mul mul p div cos 7.5 sin mul % cos(2nPi/p)sin(Pi/24) + 2 n Pi mul mul p div sin 7.5 cos mul add % +sin(2nPi/p)cos(Pi/24) + unit mul % pts to cm + 2 n Pi mul mul p div cos 7.5 cos mul % cos(2nPi/p)cos(Pi/24) + 2 n Pi mul mul p div sin 7.5 sin mul sub % -sin(2nPi/p)cos(Pi/24) + unit mul % pts to cm + ] + } for +] def +% +/TableauxPointsR24p [ +0 1 p_1 {% for m from 0 to p-1 + /m exch def + [ + 2 m Pi mul mul p div cos 7.5 sin mul neg % cos(2mPi/p)sin(Pi/24) + 2 m Pi mul mul p div sin 7.5 cos mul sub % -sin(2mPi/p)cos(Pi/24) + unit mul % pts to cm + 2 m Pi mul mul p div cos 7.5 cos mul % cos(2mPi/p)cos(Pi/24) + 2 m Pi mul mul p div sin 7.5 sin mul sub % -sin(2mPi/p)sin(Pi/24) + unit mul % pts to cm + ] + } for +] def +%%%% The procedures + % + % / drawEdges draw the edges of the polygon +/drawEdges { 0 1 p_1 { % + /n exch def + TableauxPointsL24p n get aload pop + /YL ED /XL ED +0 1 p_1 { + /m ED + XL YL moveto + TableauxPointsR24p m get aload pop + lineto +% 0 0 1 setrgbcolor + stroke + } for } for +} def + \ifPst@drawedges + drawEdges + stroke +\fi + % / drawVertices draw the vertices of the polygon + /DS \pst@number\pssizeVertices\space def +\@nameuse{psds@\psk@styleVertices}% +/drawVertices {% + /Liste exch def + 0 1 p_1 { + /compteur exch def + % newpath + pscolorVertices + Liste compteur get aload pop + Dot% radiusVertices 0 360 arc + %closepath +%0 1 0 setrgbcolor % green +%pscolorVertices +% fill + } for +} def +% +\ifPst@drawvertices + TableauxPointsL24p drawVertices + TableauxPointsR24p drawVertices +\fi + % / drawCenters draw the centers of the edges of the polygon +/DS \pst@number\pssizeCenters\space def +\@nameuse{psds@\psk@styleCenters}% +/drawCenters { + 0 1 p_1 { + /n exch def + TableauxPointsL24p n get aload pop + /YL ED /XL ED +0 1 p_1 { + /m ED + TableauxPointsR24p m get aload pop + /YR ED /XR ED + /YM YL YR add 2 div def + /XM XL XR add 2 div def + pscolorCenters + %newpath + XM YM %1.5 0 360 arc + Dot + %closepath + %1 0 0 setrgbcolor % red + stroke + } for } for + } def +\ifPst@drawcenters + drawCenters +\fi } +\end@ClosedObj +}} +% +% +%\catcode`\@=\PstAtCode\relax +\endinput +% +%% +%% END: pst-coxeter.tex -- cgit v1.2.3