绘制 E6 谎言有什么想法?

绘制 E6 谎言有什么想法?

这是我的代码。

\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}

在此处输入图片描述

问题:

我感觉我的代码不够干净清晰。你能给我另一个可以信赖的方法来绘制 E8 吗?

最新:

哭泣!

\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}

在此处输入图片描述

答案1

简短版本。如果您不想要对角线,那么就不要画它:

\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}

在此处输入图片描述

无彩色环的版本:

\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}

相关内容