Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/tex/generic/xypic/xypoly.tex

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


%% xypoly.tex from $Id: xypoly.doc,v 3.3 1996/12/18 09:28:35 ross Exp $
%%
%% Xy-pic ``Polygon'' feature.
%% Copyright (c) 1994-1996 Ross Moore <ross@mpce.mq.edu.au>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1996 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package 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 GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this macro package; if not, write to the Free Software Foundation,
%% Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{poly}{Polygon feature}{\stripRCS$Revision: 3.3 $}%
 {Ross Moore}{ross@mpce.mq.edu.au}%
 {Mathematics Department, Macquarie University, NSW~2109, Australia}
\xyrequire{arrow}\xycatcodes
\message{polygons,}
\xynew@{count}\xypolynode@\xypolynode@=\m@ne
\xydef@\xypolynode{\the\xypolynode@}
\xydef@\xypolyNUMSIDES@{}
\xydef@\xypolynum{\xypolyNUMSIDES@}
\xydef@\xypolygon{\xypoly@}%
\xydef@\xypoly@{%
 \if\inxy@ 
 \if\inxypoly@
 \edef\next@{\noexpand\xy@@{\noexpand\nter@{\xypolynode@=\the\xypolynode@
 \noexpand\def\noexpand\xypolyNUMSIDES@{\xypolyNUMSIDES@}}}}%
 \else
 \DN@{\xy@@{\def\inxypoly@{TT}%
 \nter@{\def\inxypoly@{TF}\xypolynode@=\m@ne}}}%
 \fi
 \else
 \if\inxypoly@
 \edef\next@{\noexpand\xy 
 \noexpand\xy@@{\noexpand\nter@{\xypolyside=\the\xypolyside
 \noexpand\def\noexpand\xypolyNUMSIDES@{\xypolyNUMSIDES@}\endxy}}}%
 \else
 \DN@{\xy \xy@@{\def\inxypoly@{TT}%
 \nter@{\def\inxypoly@{TF}\xypolynode@=\m@ne \endxy}}}%
 \fi
 \fi
 \next@ \count@=\z@ \xyFN@\xypoly@n}
\xydef@\inxypoly@{TF}%
\xydef@\xypoly@x{\xy@@{\leave@\leave@}}
\xydef@\xypoly@n{%
 \DN@##1{\multiply\count@10\relax \advance\count@##1\relax \xyFN@\xypoly@n}%
 \ifx \space@\next
 \ifnum\count@>\z@ \expandafter\DN@\space@{\xyFN@\xypoly@i}%
 \else \expandafter\DN@\space@{\xyFN@\xypoly@n}\fi
 \else\ifx 0\next \else\ifx 1\next \else\ifx 2\next \else\ifx 3\next
 \else\ifx 4\next \else\ifx 5\next \else\ifx 6\next \else\ifx 7\next
 \else\ifx 8\next \else\ifx 9\next
 \else \let\next@=\xypoly@i \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\xypoly@i{\edef\xypolyNUMSIDES@{\the\count@}\xyFN@\xygetpolyprefix@}
\xydef@\xypolyPREFIX@{}%
\xydef@\xypolyPREFIX@@{}%
\xydef@\xypolyname{\xypolyPREFIX@}%
\xydef@\xygetpolyprefix@{%
 \ifx\next"\DN@"##1"{\def\xypolyPREFIX@@{##1}\expandafter
 \edef\csname\xypolyPREFIX@@ NUMSIDES\endcsname{\xypolyNUMSIDES@}%
 \xypolyprefix@@ }%
 \else 
 \ifnum\xypolynode@<\z@\def\xypolyPREFIX@@{}%
 \else
 \edef\xypolyPREFIX@@{\xypolyPREFIX@\the\xypolynode@,}%
 \fi \DN@{\xypolyprefix@@}%
 \fi \next@ }
\xydef@\xypolyprefix@@{%
 \expandafter\toks@\expandafter{\addEQ@\POS"}%
 \expandafter\addtotoks@\expandafter{\xypolyPREFIX@@0"\relax}%
 \the\toks@ 
 \ifnum\xypolynode@<\z@
 \expandafter\def\expandafter\xypolyPREFIX@\expandafter{\xypolyPREFIX@@}%
 \xy@@{\enter@{\xypolynode@=\the\xypolynode@
 \noexpand\def\noexpand\xypolyPREFIX@{\xypolyPREFIX@}}\xypolynode@=\z@ }%
 \else
 \xy@@{\enter@{\xypolynode@=\the\xypolynode@
 \noexpand\def\noexpand\xypolyPREFIX@{\xypolyPREFIX@}}\xypolynode@=\z@ }%
 \expandafter\def\expandafter\xypolyPREFIX@\expandafter{\xypolyPREFIX@@}%
 \fi
 \xypoly@@i }
\xydef@\xypoly@@i#1#{\begingroup
 \DN@{#1}\ifx\next@\empty\else
 \xywarning@{discarding unused tokens: #1}\fi \xypoly@@ }
\xydef@\xypoly@@#1{\xypolydefaults@
 \DN@{#1}\ifx\next@\empty\DN@{\xypoly@@@}%
 \else \DN@{\xyFN@\xypolyparams@#1~!}\fi \next@}
\xydef@\xypolydefaults@{\def\xypolySCALE@{}%
 \def\xypolySPOKES@{{}}\def\xypostSPOKES@{}\let\xypreSPOKES@\relax
 \def\xypolySIDES@{{-}}\def\xypostSIDES@{}\let\xypreSIDES@\relax
 \def\xypolyVERTEX@{}\def\xypolyALIGN@{}}
{\xyuncatcodes \gdef\next{*=0}}
\xylet@\xypolynullvertex@=\next
{\xyuncatcodes \gdef\next{*[o]}}
\xylet@\xypolyvertex@=\next
{\xyuncatcodes \gdef\next{*+[o]}}
\xylet@\xypolywidevertex@=\next
\xydef@\xypolyparams@{%
 \ifx\space@\next \expandafter\DN@\space{\xyFN@\xypolyparams@}%
 \else\ifx\next~\DN@~{\xyFN@\xypolywhich@}%
 \else\ifx\next\bgroup\DN@##1~!{%
 \ifx\empty\xypolyVERTEX@\expandafter
 \def\expandafter\xypolyVERTEX@\expandafter{\xypolyvertex@{##1}}%
 \else\xypolyVERTEXerror@{##1}\fi \xypoly@@@}%
 \else\DN@##1~!{\DN@{##1}\ifx\next@\empty\else
 \ifx\empty\xypolyVERTEX@\def\xypolyVERTEX@{*##1}%
 \expandafter\checkpolytok@\expandafter\xypolyVERTEX@
 \expandafter{\xypolynullvertex@}##1@@!\relax
 \else\xypolyVERTEXerror@{##1}\fi\fi \xypoly@@@}%
 \fi\fi\fi \next@ }
\xydef@\xypolyVERTEXerror@#1{\xywarning@{%
 vertex already specified, discarding unused tokens:#1}}
\xydef@\xypolywhich@{%
 \ifx\next!\DN@!{\xypoly@@@}%
 \else \addLT@\ifx\next \addLT@\DN@{\xyFN@\xypoly@SPOKES@}%
 \else \addGT@\ifx\next \addGT@\DN@{\xyFN@\xypoly@SIDES@}%
 \else \addEQ@\ifx\next \addEQ@\DN@##1{%
 \def\xypolyALIGN@{##1}\xyFN@\xypolyparams@ }%
 \else \ifx :\next \DN@:##1{%
 \def\xypolySCALE@{##1}\xyFN@\xypolyparams@ }%
 \else\ifx\next*\DN@*##1{\expandafter
 \def\expandafter\xypolyVERTEX@\expandafter{\xypolywidevertex@{##1}}%
 \xyFN@\xypolyparams@}%
 \fi\fi\fi\fi\fi\fi \next@ }
\xydef@\xypoly@SPOKES@{%
 \addLT@\ifx\next \addLT@\DN@##1{%
 \def\xypreSPOKES@{##1}\def\xypolySPOKES@{}\xyFN@\xypolyparams@ }%
 \else \addGT@\ifx\next \addGT@\DN@##1{%
 \def\xypostSPOKES@{##1}\xyFN@\xypolyparams@ }%
 \else \ifx\next\bgroup \DN@##1{%
 \def\xypolySPOKES@{##1}\let\xypreSPOKES@\relax
 \checkpolytok@\xypolySPOKES@{}##1@@!{\xyFN@\xypolyparams@}}%
 \else \DN@##1{%
 \let\xypreSPOKES@\relax \def\xypolySPOKES@{{##1}}\xyFN@\xypolyparams@}%
 \fi\fi\fi \next@ }
\xydef@\xypoly@SIDES@{%
 \addLT@\ifx\next \addLT@\DN@##1{%
 \def\xypreSIDES@{##1}\def\xypolySIDES@{}\xyFN@\xypolyparams@ }%
 \else \addGT@\ifx\next \addGT@\DN@ ##1{%
 \def\xypostSIDES@{##1}\xyFN@\xypolyparams@ }%
 \else \ifx\next\bgroup \DN@##1{%
 \def\xypolySIDES@{##1}\let\xypreSIDES@\relax
 \checkpolytok@\xypolySIDES@{}##1@@!{\xyFN@\xypolyparams@}}%
 \else \DN@##1{%
 \let\xypreSIDES@\relax \def\xypolySIDES@{{##1}}\xyFN@\xypolyparams@}%
 \fi\fi\fi \next@ }
\xydef@\checkpolytok@#1#2#3#4@!#5{\DNii@{#1}\DN@{#4}%
 \ifx\next@\empty\expandafter\def\nextii@{{}}%
 \else\ifx#4@\expandafter\def\nextii@{#2{#3}}\fi\fi #5}
\xydef@\xytrigerror@#1#2{\string#1 only works from 0 to 12}
\xydef@\cosPIon#1{\ifcase#1 1\or-1\or0\or.5\or\halfroottwo\or
 .809017\or\halfrootthree\or.900969\or.92388\or.939693\or.951057\or
 .959493\or.965926\else1\xytrigerror@\cosPIon{#1}\fi}
\xydef@\sinPIon#1{\ifcase#1 0\or0\or1\or\halfrootthree\or\halfroottwo\or
 .587785\or.5\or.433884\or.382683\or.34202\or.309017\or
 .281733\or.258819\else0\xytrigerror@\sinPIon{#1}\fi}
\xydef@\cosTwoPIon#1{\ifcase#1 1\or1\or-1\or-\cosPIon3\or\cosPIon2\or
 \sinPIon{10}\or\cosPIon3\or.62349\or\cosPIon4\or
 .766044\or\cosPIon5\or.841254\or\cosPIon6%
 \else1\xytrigerror@\cosTwoPIon{#1}\fi}
\xydef@\sinTwoPIon#1{\ifcase#1 0\or0\or0\or-\sinPIon3\or\sinPIon2\or
 \cosPIon{10}\or\sinPIon3\or.781831\or\sinPIon4\or
 .642788\or\sinPIon5\or.540641\or\sinPIon6%
 \else0\xytrigerror@\sinTwoPIon{#1}\fi}
\xydef@\cosThreePIon#1{\ifcase#1 1\or-1\or0\or-1\or-\cosPIon4\or
 -\cosPIon5\or\cosPIon2\or.222521\or\sinPIon8\or\cosPIon3\or
 \sinTwoPIon5\or.654861\or\cosPIon4%
 \else1\xytrigerror@\cosThreePIon{#1}\fi}
\xydef@\sinThreePIon#1{\ifcase#1 0\or0\or1\or0\or\sinPIon4\or
 \sinTwoPIon5\or\sinPIon2\or.974928\or\cosPIon8\or\sinPIon3\or
 \cosTwoPIon5\or.75575\or\sinPIon4%
 \else0\xytrigerror@\sinThreePIon{#1}\fi}
\xydef@\cosFourPIon#1{\ifcase#1 1\or1\or1\or-\cosPIon3\or-1\or-\cosPIon5\or
 \cosTwoPIon3\or-\cosThreePIon7\or0\or.173648\or\cosTwoPIon5\or
 .415415\or\cosPIon3%
 \else1\xytrigerror@\cosFourPIon{#1}\fi}
\xydef@\sinFourPIon#1{\ifcase#1 0\or0\or0\or-\sinPIon3\or0\or\sinPIon5\or
 \sinTwoPIon3\or\sinThreePIon7\or1\or.984808\or\sinTwoPIon5\or
 .909632\or\sinPIon3%
 \else0\xytrigerror@\sinFourPIon{#1}\fi}
\xydef@\cosFivePIon#1{\ifcase#1 1\or-1\or0\or\cosPIon3\or-\cosPIon4\or
 -1\or-\cosPIon6\or-\cosTwoPIon7\or-\cosThreePIon8\or-\cosFourPIon9\or
 0\or.142315\or\sinPIon{12}%
 \else1\xytrigerror@\cosFivePIon{#1}\fi}
\xydef@\sinFivePIon#1{\ifcase#1 0\or0\or1\or-\sinPIon3\or-\sinPIon4\or
 0\or\sinPIon6\or\sinTwoPIon7\or\sinThreePIon8\or\sinFourPIon9\or1\or
 .989821\or\cosPIon{12}%
 \else0\xytrigerror@\sinFivePIon{#1}\fi}
\xydef@\xypoly@@@{\count@=\xypolyNUMSIDES@\relax
 \ifx\xypolyALIGN@\empty
 \ifnum\count@<\thr@@\relax\DN@{\xypolytoosmall@{\the\count@}}%
 \else \advance\count@-\thr@@
 \ifcase\count@ \DN@{\xyPolygon@@@\xytriangle@@}%
 \or \DN@{\xyPolygon@@@\xysquare@@}%
 \or \DN@{\xyPolygon@@@\xypentagon@@}%
 \or \DN@{\xyPolygon@@@\xyhexagon@@}%
 \or \DN@{\xyPolygon@@@\xyheptagon@@}%
 \or \DN@{\xyPolygon@@@\xyoctagon@@}%
 \or \DN@{\xyPolygon@@@\xynonagon@@}%
 \or \DN@{\xyPolygon@@@\xydecagon@@}%
 \or \DN@{\xyPolygon@@@\xyundecagon@@}%
 \or \DN@{\xyPolygon@@@\xydodecagon@@}%
 \else \DN@{\xylargePolygon@{0}{\xypolyNUMSIDES@}}%
 \fi\fi
 \else 
 \DN@{\xylargePolygon@{\xypolyALIGN@}{\xypolyNUMSIDES@}}%
 \fi \next@ \xypoly@@@x}
\xydef@\xypoly@@@x{\restore\xypoly@x}
\xydef@\xypolytoosmall@#1{\xyerror@{#1 sides is too few for a polygon}}
\xydef@\xyPolygon@@@#1{%
 \toks@={\def\xypolyNUMSIDES@}%
 \expandafter\addtotoks@\expandafter{\expandafter{\xypolyNUMSIDES@}\save}%
 \ifx\empty\xypolySCALE@ \addtotoks@{\POS"}%
 \else \addtotoks@{\POS;0;}%
 \expandafter\addtotoks@\expandafter{\xypolySCALE@\relax\POS"}%
 \fi
 \expandafter\addtotoks@\expandafter{\xypolyPREFIX@0"\relax}%
 \ifx\xypreSPOKES@\relax
 \addtotoks@{#1{;}}%
 \expandafter\addtotoks@\expandafter{\expandafter{\xypolyVERTEX@}}%
 \expandafter\addtotoks@\expandafter{\expandafter{\xypolyPREFIX@}}%
 \DN@##1\next@{\def\tmp@{**\dir##1}}%
 \expandafter\next@\expandafter{\xypolySPOKES@}\next@
 \expandafter\addtotoks@\expandafter{\expandafter{\tmp@}}%
 \else
 \expandafter\DN@\expandafter{\expandafter\ar\xypreSPOKES@}%
 \addtotoks@{#1}%
 \expandafter\addtotoks@\expandafter{\expandafter{\next@}}%
 \expandafter\addtotoks@\expandafter{\expandafter{\xypolyVERTEX@}}%
 \expandafter\addtotoks@\expandafter{\expandafter{\xypolyPREFIX@}{}}%
 \fi
 \expandafter\addtotoks@\expandafter{\expandafter{\xypostSPOKES@}}%
 \ifx\xypreSIDES@\relax
 \addtotoks@{{;}}%
 \DN@##1\next@{\def\tmp@{**\dir##1}}%
 \expandafter\next@\expandafter{\xypolySIDES@}\next@
 \expandafter\addtotoks@\expandafter{\expandafter{\tmp@}}%
 \else
 \expandafter\DN@\expandafter{\expandafter\ar\xypreSIDES@}%
 \expandafter\addtotoks@\expandafter{\expandafter{\next@}{}}%
 \fi
 \expandafter\addtotoks@\expandafter{\expandafter{\xypostSIDES@}}%
 \ifx\xypolyALIGN@\empty
 \ifnum\xypolyNUMSIDES@>12\addtotoks@{{0}}\fi
 \else
 \expandafter\addtotoks@\expandafter{\expandafter{\xypolyALIGN@}}%
 \fi
 \expandafter\DN@\expandafter{\expandafter\endgroup\the\toks@ }%
 \next@}
\xydef@\xytriangle@@#1#2#3#4#5#6#7#8{%
 \xy@@{\xypolynode@=\@ne}%
 \POS#1"#30"+(0,1)#2="#31"#4#5\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#30"#1"#30"+(-\cosPIon6, -.5)#2="#32"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#31"#6"#32"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\cosPIon6,-.5)#2="#33"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#32"#6"#33"#7#8\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#33"#6"#31"#7#8\relax }
\xydef@\xysquare@@#1#2#3#4#5#6#7#8{%
 \xy@@{\xypolynode@=\@ne}%
 \POS#1"#30"+(\halfroottwo,\halfroottwo)#2="#31"#4#5\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#30"#1"#30"+(-\halfroottwo,\halfroottwo)#2="#32"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#31"#6"#32"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\halfroottwo,\halfroottwo)#2="#33"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#32"#6"#33"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(-\halfroottwo,\halfroottwo)#2="#34"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#33"#6"#34"#7#8\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#34"#6"#31"#7#8\relax }
\xydef@\xypentagon@@#1#2#3#4#5#6#7#8{%
 \xy@@{\xypolynode@=\@ne}%
 \POS#1"#30"+(\cosPIon{10},\sinPIon{10})#2="#31"#4#5\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#30"#1"#30"+(0,1)#2="#32"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#31"#6"#32"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(-\cosPIon{10},\sinPIon{10})#2="#33"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#32"#6"#33"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinPIon5,\cosPIon5)#2="#34"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#33"#6"#34"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinPIon5,-\cosPIon5)#2="#35"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#34"#6"#35"#7#8\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#35"#6"#31"#7#8\relax }
\xydef@\xyhexagon@@#1#2#3#4#5#6#7#8{%
 \xy@@{\xypolynode@=\@ne}%
 \POS#1"#30"+(1,0)#2="#31"#4#5\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#30"#1"#30"+(.5,\halfrootthree)#2="#32"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#31"#6"#32"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(-.5,\halfrootthree)#2="#33"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#32"#6"#33"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(1,0)#2="#34"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#33"#6"#34"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(.5,\halfrootthree)#2="#35"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#34"#6"#35"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(-.5,\halfrootthree)#2="#36"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#35"#6"#36"#7#8\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#36"#6"#31"#7#8\relax }
\xydef@\xyheptagon@@#1#2#3#4#5#6#7#8{%
 \xy@@{\xypolynode@=\@ne}%
 \POS#1"#30"+(\sinTwoPIon7,\cosTwoPIon7)#2="#31"#4#5\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#30"#1"#30"+(0,1)#2="#32"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#31"#6"#32"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(-\sinTwoPIon7,\cosTwoPIon7)#2="#33"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#32"#6"#33"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinThreePIon7,\cosThreePIon7)#2="#34"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#33"#6"#34"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinPIon7,\cosPIon7)#2="#35"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#34"#6"#35"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinPIon7,-\cosPIon7)#2="#36"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#35"#6"#36"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinThreePIon7,-\cosThreePIon7)#2="#37"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#36"#6"#37"#7#8\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#37"#6"#31"#7#8\relax }
\xydef@\xyoctagon@@#1#2#3#4#5#6#7#8{%
 \xy@@{\xypolynode@=\@ne}%
 \POS#1"#30"+(\cosPIon8,\sinPIon8)#2="#31"#4#5\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#30"#1"#30"+(\sinPIon8,\cosPIon8)#2="#32"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#31"#6"#32"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinPIon8,-\cosPIon8)#2="#33"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#32"#6"#33"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\cosPIon8,-\sinPIon8)#2="#34"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#33"#6"#34"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\cosPIon8,\sinPIon8)#2="#35"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#34"#6"#35"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinPIon8,\cosPIon8)#2="#36"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#35"#6"#36"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinPIon8,-\cosPIon8)#2="#37"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#36"#6"#37"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\cosPIon8,-\sinPIon8)#2="#38"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#37"#6"#38"#7#8\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#38"#6"#31"#7#8\relax }
\xydef@\xynonagon@@#1#2#3#4#5#6#7#8{%
 \xy@@{\xypolynode@=\@ne}%
 \POS#1"#30"+(\sinFourPIon9,\cosFourPIon9)#2="#31"#4#5\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#30"#1"#30"+(\sinTwoPIon9,\cosTwoPIon9)#2="#32"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#31"#6"#32"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(0,1)#2="#33"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#32"#6"#33"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(-\sinTwoPIon9,\cosTwoPIon9)#2="#34"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#33"#6"#34"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(-\sinFourPIon9,\cosFourPIon9)#2="#35"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#34"#6"#35"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\cosPIon6,\sinPIon6)#2="#36"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#35"#6"#36"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinPIon9,\cosPIon9)#2="#37"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#36"#6"#37"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinPIon9,-\cosPIon9)#2="#38"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#37"#6"#38"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\cosPIon6,-\sinPIon6)#2="#39"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#38"#6"#39"#7#8\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#39"#6"#31"#7#8\relax }
\xydef@\xydecagon@@#1#2#3#4#5#6#7#8{%
 \xy@@{\xypolynode@=\@ne}%
 \POS#1"#30"+(1,0)#2="#31"#4#5\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#30"#1"#30"+(\cosPIon5,\sinPIon5)#2="#32"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#31"#6"#32"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinPIon{10},\cosPIon{10})#2="#33"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#32"#6"#33"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinPIon{10},-\cosPIon{10})#2="#34"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#33"#6"#34"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\cosPIon5,-\sinPIon5)#2="#35"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#34"#6"#35"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(1,0)#2="#36"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#35"#6"#36"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\cosPIon5,\sinPIon5)#2="#37"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#36"#6"#37"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinPIon{10},\cosPIon{10})#2="#38"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#37"#6"#38"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinPIon{10},-\cosPIon{10})#2="#39"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#38"#6"#39"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\cosPIon5,-\sinPIon5)#2="#310"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#39"#6"#310"#7#8\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#310"#6"#31"#7#8\relax }
\xydef@\xyundecagon@@#1#2#3#4#5#6#7#8{%
 \xy@@{\xypolynode@=\@ne}%
 \POS#1"#30"+(\sinFourPIon{11},\cosFourPIon{11})#2="#31"#4#5\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#30"#1"#30"+(\sinTwoPIon{11},\cosTwoPIon{11})#2="#32"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#31"#6"#32"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(0,1)#2="#33"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#32"#6"#33"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(-\sinTwoPIon{11},\cosTwoPIon{11})#2="#34"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#33"#6"#34"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(-\sinFourPIon{11},\cosFourPIon{11})#2="#35"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#34"#6"#35"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinFivePIon{11},\cosFivePIon{11})#2="#36"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#35"#6"#36"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinThreePIon{11},\cosThreePIon{11})#2="#37"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#36"#6"#37"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinPIon{11},\cosPIon{11})#2="#38"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#37"#6"#38"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinPIon{11},-\cosPIon{11})#2="#39"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#38"#6"#39"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinThreePIon{11},-\cosThreePIon{11})#2="#310"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#39"#6"#310"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinFivePIon{11},-\cosFivePIon{11})#2="#311"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#310"#6"#311"#7#8\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#311"#6"#31"#7#8\relax }
\xydef@\xydodecagon@@#1#2#3#4#5#6#7#8{%
 \xy@@{\xypolynode@=\@ne}%
 \POS#1"#30"+(\cosPIon{12},\sinPIon{12})#2="#31"#4#5\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#30"#1"#30"+(\halfroottwo,\halfroottwo)#2="#32"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#31"#6"#32"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinPIon{12},\cosPIon{12})#2="#33"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#32"#6"#33"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinPIon{12},-\cosPIon{12})#2="#34"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#33"#6"#34"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\halfroottwo,-\halfroottwo)#2="#35"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#34"#6"#35"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\cosPIon{12},-\sinPIon{12})#2="#36"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#35"#6"#36"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\cosPIon{12},\sinPIon{12})#2="#37"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#36"#6"#37"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\halfroottwo,\halfroottwo)#2="#38"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#37"#6"#38"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"-(\sinPIon{12},\cosPIon{12})#2="#39"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#38"#6"#39"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\sinPIon{12},-\cosPIon{12})#2="#310"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#39"#6"#310"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\halfroottwo,-\halfroottwo)#2="#311"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#310"#6"#311"#7#8\relax
 \xy@@{\advance\xypolynode@\tw@}%
 \POS"#30"#1"#30"+(\cosPIon{12},-\sinPIon{12})#2="#312"#4#5\relax
 \xy@@{\advance\xypolynode@\m@ne}%
 \POS"#311"#6"#312"#7#8\relax
 \xy@@{\advance\xypolynode@\@ne}%
 \POS"#312"#6"#31"#7#8\relax }
\xydef@\xylargePolygon@#1#2{%
 \dimen@=#1\p@
 \xyPolygon@@@\xypolygon@@}
\xydef@\xypolyrepeat@{\fi}
\xydef@\xypolybody@{}
\xydef@\xypolyiterate@{\xypolybody@\expandafter\xypolyiterate@\else\fi}
\xydef@\xypolyloop@#1\xypolyrepeat@{\def\xypolybody@{#1}\xypolyiterate@}
\xydef@\xypolygon@@#1#2#3#4#5#6#7#8#9{\save
 \vfromcartesianangle@{#9}\edef\next@{\the\X@c,\the\Y@c\addGT@\empty}%
 \xy@@{\xypolynode@=\@ne}%
 \toks@={\POS#1"#30"+}%
 \expandafter\expandafter\expandafter\addtotoks@\expandafter
 \expandafter\expandafter{\addLT@\empty}%
 \expandafter\addtotoks@\expandafter{\next@#2="#31"#4#5\relax}%
 \xy@@\dontleave@ \the\toks@
 \xypolyloop@
 \dimen@=360\p@ \count@@=\xypolyNUMSIDES@\relax \advance\dimen@ .5\count@@
 \divide\dimen@ \xypolyNUMSIDES@ \relax 
 \multiply\dimen@\xypolynode@ \relax \advance\dimen@ #9\p@ 
 \edef\tmp@{%
 \noexpand\vfromcartesianangle@{\expandafter\removePT@\the\dimen@}}%
 \tmp@ \edef\next@{\the\X@c,\the\Y@c\addGT@\empty}%
 \xy@@{\advance\xypolynode@\@ne}\count@=\xypolynode@
 \toks@={\POS"#30"#1"#30"+}\edef\nextii@{\the\count@}%
 \expandafter\expandafter\expandafter\addtotoks@\expandafter
 \expandafter\expandafter{\addLT@\space}%
 \expandafter\addtotoks@\expandafter{\next@#2="#3}%
 \expandafter\addtotoks@\expandafter{\nextii@"#4#5\relax}%
 \the\toks@ 
 \count@=\xypolynode@ \xy@@{\advance\xypolynode@\m@ne}%
 \toks@={\POS"#3}\expandafter\addtotoks@\expandafter{\the\xypolynode@"#6"#3}%
 \expandafter\addtotoks@\expandafter{\the\count@"#7#8\relax}%
 \the\toks@
 \xy@@{\advance\xypolynode@\@ne}\count@=\xypolyNUMSIDES@ \relax
 \ifnum\xypolynode@<\count@ \relax \xypolyrepeat@
 \toks@={\POS"#3}%
 \expandafter\addtotoks@\expandafter{\xypolyNUMSIDES@"#6"#31"#7#8\relax}%
 \the\toks@ \restore }
\xyendinput

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.