Skip to content

Instantly share code, notes, and snippets.

@ashiato45
Created May 16, 2014 12:50
Show Gist options
  • Save ashiato45/f6fa31e7420cd552a09f to your computer and use it in GitHub Desktop.
Save ashiato45/f6fa31e7420cd552a09f to your computer and use it in GitHub Desktop.
\begin{tikzpicture}[scale=5]
\draw plot [smooth cycle]
coordinates{
(1,-0.1) (1,1) (-1,1) (-1,-1) (1,-1) (1,0.1) (0.5,0)
(0.5,-0.5) (-0.5,-0.5) (-0.5,0.5) (0.5,0.5) (0.5,0)
};
\end{tikzpicture}
\begin{tikzpicture}[xshift=2cm]
\draw (0,0) -- (2,0);
\begin{scope}[xshift=2cm]
\draw[blue] (0:2cm)+(0,0.5) circle (0.1cm);
\draw[blue] (0:2cm)+(0,-0.5) circle (0.1cm);
\foreach \x in {30,60,...,360}
\draw (\x:1cm) circle (0.1cm);
\foreach \x in {360,330,...,30}
\draw[red] (\x:3cm) circle (0.1cm);
% \draw plot [smooth cycle]
% coordinates{
% (0:2cm)+(0,-0.5)
% \foreach \x in {0,30,60,...,360}
% (\x:3cm)
% (0:2cm)+(0,0.5)
% \foreach \x in {360,330,...,0}
% (\x:1cm)
% (0:2cm)+(0,-0.5)
% };
\end{scope}
\end{tikzpicture}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment