Thursday, August 31, 2006

The largest 3-regular graph of diameter 3


See this paper

\documentclass{article}
\usepackage{tikz}
\pagestyle{empty}

\begin{document}
\begin{center}
\begin{tikzpicture}[style=thick]
\foreach \x in {18,90,...,306}
{
\draw (\x:4cm) circle (2pt) -- (\x+72:4cm);
\draw (\x:4cm) -- (\x:3cm) circle (2pt);
\draw (\x:3cm) -- (\x+15:2cm) circle (2pt);
\draw (\x:3cm) -- (\x-15:2cm) circle (2pt);
\draw (\x+15:2cm) -- (\x+144-15:2cm);
\draw (\x-15:2cm) -- (\x+144+15:2cm);
}
\end{tikzpicture}
\end{center}
\end{document}

3 comments:

Anonymous said...

Genial post and this mail helped me alot in my college assignement. Say thank you you as your information.

Grant said...

Your post is really helpful to me. But there is one problem I couldn't sort out. You can put \x+15 to do the addition and \x-15 to do the subtraction. However, what I need is to do something like "15-\x". I tried this, but it didn't work. Are you able to assist me this? Could you send me an e-mail to generalrao@hotmail.com if you know the answer. Thanks a lot.

Rafael said...

@Grant

I'm not sure what the problem is, since the following compiles just fine for me:

\documentclass{article}
\usepackage{tikz}
\pagestyle{empty}
\listfiles
\begin{document}
\begin{center}
\begin{tikzpicture}[style=thick]
\foreach \x in {0,1,...,5}
{
\draw (5-\x,0) -- (1,1);
}
\end{tikzpicture}
\end{center}
\end{document}


with this versions:
(the pgf package that comes with texlive in Ubuntu)

*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
tikz.sty 2008/02/13 v2.00 (rcs-revision 1.27)
pgf.sty 2008/01/15 v2.00 (rcs-revision 1.12)
pgfrcs.sty 2008/02/20 v2.00 (rcs-revision 1.21)
pgfrcs.code.tex
pgfcore.sty 2008/01/15 v2.00 (rcs-revision 1.6)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2009/08/28 v1.8 graphics configuration of TeX Live
pdftex.def 2009/08/25 v0.04m Graphics/color for pdfTeX
pgfsys.sty 2008/02/07 v2.00 (rcs-revision 1.31)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2008/01/23 (rcs-revision 1.6)
pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4)
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pgfcore.code.tex
pgfcomp-version-0-65.sty 2007/07/03 v2.00 (rcs-revision 1.7)
pgfcomp-version-1-18.sty 2007/07/23 v2.00 (rcs-revision 1.1)
pgffor.sty 2007/11/07 v2.00 (rcs-revision 1.8)
pgffor.code.tex
tikz.code.tex
supp-pdf.mkii
***********