Sunday

LaTeX: Draw Smiley 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_smiley.tex

Write code below:
{
\documentclass[12pt,a4paper]{article}
\usepackage{tikz}
\begin{document}
\begin{figure}[H] %Here placement specifier
\begin{center}
\begin{tikzpicture}
\filldraw[fill=yellow,draw=black,very thick] (0,0) ellipse (3cm and 4cm); %draw face
\fill[black] (-1,2) ellipse (0.5cm and 1cm); %draw left eye
\fill[black] (1,2) ellipse (0.5cm and 1cm); %draw right eye
\draw[black,very thick] (-2.1,0) arc (225:315:3cm); %start point from (-2.1,0), radius is 3cm, starting angle 225 degree
\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:

Alert: Social Media Instant Message Scammer or Your Own Company is the Scammer as mobile phone digital security

Bank HLBB: Thank you for using your card 8622 at BIGPAY-Malaysia MYR3299.00. Call the scammer mobile phone 03293550137 if you didn’t use it.