Sunday

LaTeX: Draw Yin Yang using TikZ package

Download and install Basic MiKTeX 64-bit Installer from
http://miktex.org/download

Start Menu > MiKTeX > TeXworks

Name and save the empty new file as texworks_yinyang.tex

Write code below:
{
\documentclass[12pt,a4paper]{article}
\usepackage{tikz}

\begin{document}

\begin{figure}[H] %Here placement specifier
\begin{center}
\begin{tikzpicture}[xscale=1.0,yscale=1.0]

\draw[black,ultra thick] (0,0) ellipse (6cm and 6cm); %outer circle

\fill[black] (0,0) (0,-6) arc (270:450:6cm); % right big black filled semicircle, center point, start point
\filldraw[fill=white,draw=black,ultra thick] (0,3) (0,0) arc (270:450:3cm); %right small white filled semicircle
\fill[black] (0,3) ellipse (1cm and 1cm); %upper black filled circle

\filldraw[fill=black,draw=black,,ultra thick] (0,-3) (0,0) arc (90:270:3cm); %left small black filled semicircle
\fill[white] (0,-3) ellipse (1cm and 1cm); %lower white filled circle

\end{tikzpicture}
\end{center}
\end{figure}

\end{document}
}

Toolbar >  Typeset of play icon
or
Hit Ctrl+T to execute and typeset the LaTeX code

Output:

No comments:

If a hater attacked your age and not the goodness of you

Whether young or old, I've always been known what endures. I've known the very idea of people that were all created equal and deserv...