5

This is my code.

\documentclass[border=10pt]{standalone}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}[linewidth=.7pt,dotsize=8pt](-5,-5)(5,5)
\def\n{5}
\degrees[12]
\SpecialCoor
{\psset{linecolor=pink}
\multido{\iiA=1+1,\iiD=2+1}{12}{%
    \psline(\n;\iiA)(\n;\iiD)}
\multido{\iiA=1+1,\iiB=3+1,\iiC=8+1}{12}{%
\multido{\iA=\iiA+0,\iB=\iiB+1,\iC=\iiC+1}{4}{%
        \psline(\n;\iA)(\n;\iB)
        \psline(\n;\iA)(\n;\iC)
}
}}
\multido{\iiA=1+1}{12}{\psdot(\n;\iiA)}
%%%
\def\all#1#2#3{%
{\psset{linecolor=#3}
\multido{\iA=1+1,\iB=13+1}{12}{\pnode(#1\iA){#1\iB}}
\multido{\iiA=1+1,\iiD=2+1}{12}{%
\psline(#1\iiA)(#1\iiD)}
\multido{\iiA=1+1,\iiB=3+1,\iiC=8+1}{12}{%
\multido{\iA=\iiA+0,\iB=\iiB+1,\iC=\iiC+1}{4}{%
    \psline(#1\iA)(#1\iB)
    \psline(#1\iA)(#1\iC)
}
}}
\multido{\iiA=1+1}{12}{\psdot*[linecolor=#2](#1\iiA)}
}
%%
\multido{\iiA=1+1,\iiB=5+1,\iiC=3+1,\iiD=6+1}{12}{%
\psIntersectionPoint(\n;\iiA)(\n;\iiB)(\n;\iiC)(\n;\iiD){I\iiA}
}
%%%%
\all{I}{blue}{gray}
%%%%
\multido{\iiA=1+1,\iiB=8+1,\iiC=3+1,\iiD=11+1}{12}{%
\psIntersectionPoint(\n;\iiA)(\n;\iiB)(\n;\iiC)(\n;\iiD){J\iiA}
}
%%%
\all{J}{red}{black!30}
%%%
\multido{\iiA=1+1,\iiB=8+1,\iiC=4+1,\iiD=11+1}{12}{%
\psIntersectionPoint(\n;\iiA)(\n;\iiB)(\n;\iiC)(\n;\iiD){K\iiA}
}
%%%
\all{K}{green}{gray!50}
%%%
\end{pspicture}
\end{document}

enter image description here

Question:

I feel my code is not clean and clear. Can you give me another idea that can be trusted to draw E8?

Up-to-date:

Sob!

\documentclass[border=10pt]{standalone}
\usepackage{pstricks-add}
\begin{document}
\begin{pspicture}[linewidth=.8pt,dotsize=25pt](-15,-15)(15,15)
\def\n{15}
%
\multido{\iiA=6+12,\iiC=18+12}{30}{%
\rput(\n;\iiA){\iiA}
\psline(\n;\iiA)(\n;\iiC)
}
\multido{\iiA=6+12,\iiB=30+12,\iiC=198+12}{30}{%
\multido{\iA=\iiA+0,\iB=\iiB+12,\iC=\iiC+12}{13}{%
    \psline(\n;\iA)(\n;\iB)
    \psline(\n;\iA)(\n;\iC)
}
}
\multido{\iiA=6+12}{30}{\psdot[linecolor=red](\n;\iiA)}
%%%%%
\multido{\iiA=6+12,\iiB=138+12,\iiC=18+12,\iiD=246+12,\iiE=1+1}{30}{%
    \psIntersectionPoint(\n;\iiA)(\n;\iiB)(\n;\iiC)(\n;\iiD){I\iiE}
    }
%%%%
    \multido{\iiA=1+1,\iiW=31+1}{30}{\pnode(I\iiA){I\iiW}}
    \multido{\iiA=1+1,\iiD=2+1}{30}{\psline(I\iiA)(I\iiD)}
    %%%%
\multido{\iiA=1+1,\iiB=3+1,\iiC=17+1}{30}{%
        \multido{\iA=\iiA+0,\iB=\iiB+1,\iC=\iiC+1}{13}{%
            \psline(I\iA)(I\iB)
            \psline(I\iA)(I\iC)
        }
    }
\multido{\i=1+1}{30}{\psdot[linecolor=blue](I\i)}
\end{pspicture}
\end{document}

enter image description here

6
  • How is this related to E_6? Is this some projection of the root lattice?
    – user121799
    Aug 5, 2019 at 15:38
  • @user121799 Yes, it is. You can see at here. en.wikipedia.org/wiki/E6_(mathematics)#/media/…
    – user173875
    Aug 5, 2019 at 17:27
  • OK, then the answers to this question may be a starting point. (But the information content is not too great IMHO, you only have some Z_N's and lengths. This does not tell you too much about E_6 nor E_8.)
    – user121799
    Aug 5, 2019 at 17:34
  • @user121799 It is drawn based on upload.wikimedia.org/wikipedia/commons/1/14/E8Petrie.svg :-)
    – user173875
    Aug 5, 2019 at 17:46
  • You know package pst-cox?
    – user187802
    Aug 6, 2019 at 10:51

1 Answer 1

4

A short version. If you do not want the diagonals then simply do not draw it:

\documentclass[border=10pt]{standalone}
\usepackage{pst-calculate}
\usepackage{pstricks-add}
\begin{document}

\def\n{5}
\degrees[12]
\psset{nodesep=4pt}
\begin{pspicture}[linewidth=.7pt,dotsize=8pt](-5,-5)(5,5)
\pgfforeach \ColA/\ColB/\ColC/\ColD in % draw two circles
  {black/red!30/green/black!30,blue/cyan!30/red/blue!20}{%
    \multido{\iA=0+1,\iB=1+1}{12}{%   first one
      \multido{\iC=1+1}{11}{%
        \ifnum\iA<12\pcline[linecolor=\ColB](\n;\iA)(\n;\iC)\fi}%
      \psdot[linecolor=\ColA](\n;\iA)%
    }%
  \xdef\n{\pscalculate{\n*sqrt(2)/2}}%
  \multido{\rA=0.5+1.0}{12}{%  second one
    \multido{\rC=1.5+1.0}{11}{%
      \ifdim\rA pt<12pt\pcline[linecolor=\ColD](\n;\rA)(\n;\rC)\fi}%
    \psdot[linecolor=\ColC](\n;\rA)%
  }
  \xdef\n{\pscalculate{\n*sqrt(2)/2}}%  must be global
}
\end{pspicture}

\end{document}

enter image description here

A version without the color loop:

\documentclass[border=10pt]{standalone}
\usepackage{pst-calculate}
\usepackage{pstricks-add}

\def\CircleA#1#2{%
  \degrees[12]%
  \multido{\iA=0+1}{12}{%
    \multido{\iC=1+1}{11}{%
        \ifnum\iA<12\pcline[linecolor=#2](\n;\iA)(\n;\iC)\fi
    }%
    \psdot[linecolor=#1](\n;\iA)%
  }%
  \xdef\n{\pscalculate{\n*sqrt(2)/2}}%
}
\def\CircleB#1#2{%
  \degrees[24]%
  \multido{\iA=1+2}{12}{%
    \multido{\iC=3+2}{11}{%
        \ifnum\iA<24 \pcline[linecolor=#2](\n;\iA)(\n;\iC)\fi
    }%
    \psdot[linecolor=#1](\n;\iA)%
  }%
  \xdef\n{\pscalculate{\n*sqrt(2)/2}}%
}
\begin{document}

\def\n{5}
\begin{pspicture}[linewidth=.7pt,dotsize=8pt,nodesep=4pt](-5,-5)(5,5)
\CircleA{black}{red!30}%
\CircleB{green}{black!30}%
\CircleA{blue}{cyan!30}%
\CircleB{red}{blue!20}%
\end{pspicture}

\end{document}
11
  • I understand your idea, but more time with your code.
    – user173875
    Aug 6, 2019 at 5:51
  • only with xelatex, not with latex->dvips->ps2pdf. The problem is \pgfforeach
    – user187802
    Aug 6, 2019 at 7:10
  • Are you sure? It is loaded NORMALLY with latex->dvips->ps2pdf by my compiler ...!
    – user173875
    Aug 6, 2019 at 7:16
  • I meant, that compiling with xelatex is slow and with latex fast
    – user187802
    Aug 6, 2019 at 7:23
  • 1
    That is simple geometry of the triangles. A triangle of two black and one green point is a equilateral triangle with known angles.
    – user187802
    Aug 6, 2019 at 7:31

You must log in to answer this question.