Entry 3523

A TikZ Example

   

Submitted by Fidel BC on April 8, 2010 at 5:01 a.m.
Language: TeX. Code size: 992 bytes.

\usetikzlibrary{shadows}
\definecolor{edge_color}{HTML}{855600}
\definecolor{vertex_color}{HTML}{01C0FF}
\begin{tikzpicture}[
vertex/.style={circle,shading=ball,ball color=vertex_color,draw=vertex_color!40!white,drop shadow={opacity=0.4}},
edge/.style={ultra thick, edge_color,drop shadow={opacity=0.8}}]

\useasboundingbox (-5.05,-4.4) rectangle (5.1,5.25);

\begin{scope}[rotate=90]

   \foreach \x/\y in {0/1,72/2,144/3,216/4,288/5}{
      \coordinate (\y) at (canvas polar cs: radius=2.5cm,angle=\x);
   }
   \foreach \x/\y in {0/6,72/7,144/8,216/9,288/10}{
      \coordinate (\y) at (canvas polar cs: radius=5cm,angle=\x);
   }

\end{scope}

\foreach \x/\y in {1/6,2/7,3/8,4/9,5/10}{
   \draw[edge] (\x) -- (\y);
}

\foreach \x/\y in {1/3,2/4,3/5,4/1,5/2}{
   \draw[edge] (\x) -- (\y);
}

\foreach \x/\y in {6/7,7/8,8/9,9/10,10/6}{
   \draw[edge] (\x) -- (\y);
}

\foreach \x in {1,2,3,4,5,6,7,8,9,10}{
   \node[vertex] at (\x){};
}

\end{tikzpicture}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).