# How to draw Closed curver with TiKZ?

I want to draw the following diagram.

I have tried with the following Latex command:

\documentclass[12pt,twoside,a4paper]{book}
\usepackage{graphicx,wrapfig,tikz}
\begin{document}

\begin{tikzpicture}
\draw (0,4) ellipse ( 2cm and .6cm);

\draw (2,4) -- (2,0);
\draw[fill] (0,0) circle (1pt);
\end{tikzpicture}
\end{document}


How can I draw this diagram using tikzpicture?

-
Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Christian Hupfer Aug 21 '14 at 7:25
I would go for hobby. You can find an example in Draw a closed liquid-droped shaped curve with TikZ. –  Claudio Fiandrino Aug 21 '14 at 7:33

Using hobby package (\usetikzlibrary{hobby}) and calc for operations with coordinates we get this (PGF/Tikz 3.0.x)

\documentclass[12pt,twoside,a4paper]{book}
\usepackage{graphicx,wrapfig,tikz}
\usetikzlibrary{calc,hobby} % To draw the smooth curve
\begin{document}
\tikzset{
circ/.pic={ % Defines a circle to mark the coordinates.
\fill (0,0) circle (2pt);
}
}
\begin{tikzpicture}
\coordinate (a1) at (0,0);
\coordinate (a2) at (3.3,-0.3);
\coordinate (a3) at (4.5,0.2);
\coordinate (a4) at (2,1.5);
\coordinate (a5) at (3,3);
\coordinate (a6) at (2.4,3.2);
\coordinate (a7) at (1,2);
\coordinate (O) at ($(a1)-(1,2)$);
\draw[thick] (O)--($(a3|-O)+(1,0)$);
\foreach \i in {5,6,7} \draw[densely dotted] (a\i)-- (a\i|-O);
\begin{scope}
\clip[use Hobby shortcut] ([out angle=-90]a1)..(a2)..([in angle=-90]a3);
\foreach \i in {5,6,7} \draw[red] (a\i)-- (a\i|-O);
\end{scope}
\begin{scope}
\clip[use Hobby shortcut] ([out angle=90]a3)..(a4)..(a5)..(a6)..(a7)..([in angle=90]a1);
\foreach \i in {5,6,7} \draw[red] (a\i)-- (a\i|-O);
\end{scope}
\draw[use Hobby shortcut,thick] ([out angle=-90]a1)..(a2)..([in angle=-90]a3);
\draw[use Hobby shortcut,thick] ([out angle=90]a3)..(a4)..(a5)..(a6)..(a7)..([in angle=90]a1);
\foreach \i in {1,3} \draw (a\i)-- (a\i|-O);
\foreach \i in  {1,3,5,6,7} {\draw (a\i) pic {circ};}
\end{tikzpicture}
\end{document}


-