# draw a smooth dendrite

I want to draw a dendrite and here is what I have done till now,

\documentclass{article}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{3d,calc}
\newcommand*{\hd}{1.0}%
\newcommand*{\vd}{1.5}%

\begin{document}

\begin{tikzpicture}
\begin{scope}[rotate=90]
\draw (0,0) -- (\hd,0)--(\hd,\vd) -- (2*\hd, \vd) -- (2*\hd, 0) -- (3*\hd, 0) --(3*\hd, \vd)--(4*\hd, \vd) --(4*\hd, 0) --(5*\hd, 0) ;
\end{scope}

\begin{scope}[rotate=270,shift = {(-5*\hd,0.75*\vd)}]
\draw (0,0) -- (\hd,0)--(\hd,\vd) -- (2*\hd, \vd) -- (2*\hd, 0) -- (3*\hd, 0) --(3*\hd, \vd)--(4*\hd, \vd) --(4*\hd, 0) --(5*\hd, 0) ;
\end{scope}
\draw(0,3.333*\vd) --(1.1*\hd,3.333*\vd);

\end{tikzpicture}

\end{document}


This is very elementary set-up where I found it difficult to make corners of the dendrites smooth. To get a half dendrite and make the smooth corners , I thought to make a periodic function (a parabola e.g.) and make a collection of them shifted by a distance and then rotating the set but I am not able to plot parabolas side by side.

• Could you please post an image of the desired result? Googling for images of dendrites revealed not very helpful. – JLDiaz Jun 3 '14 at 14:35
• You might try the hobby package, which lets you "draw" a smooth path by specifying a relatively small number of points on the paths (with tangent angles if desired). – Charles Staats Jun 3 '14 at 14:35
• @JLDiaz, the desired result can be seen at end of the question. – alekhine Jun 3 '14 at 15:03
• @alekhine Oh, sorry, I thought that it was the output of your code. It looked good enough to me :-) – JLDiaz Jun 3 '14 at 15:24

Is this close enough?

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[thick, x=4mm]
\draw[y= 4mm, rounded corners=1mm] (0,0.5) \foreach \i in {0,...,10}
{ -- ++(0.25,5-0.4*\i) -- ++(0.5,0) -- ++(0.25, -5+0.4*\i) -- ++(0.5,0) }
-- ++(0.3,1) to[bend left=10] ++(2,-1.5);
\draw[y=-4mm, rounded corners=1mm] (0,0.5) \foreach \i in {0,...,10}
{ -- ++(0.25,5-0.4*\i) -- ++(0.5,0) -- ++(0.25, -5+0.4*\i) -- ++(0.5,0) }
-- ++(0.3,1) to[bend right=10] ++(2,-1.5);
\end{tikzpicture}
\end{document}


• Much Better than I thought..!! thank you very much jLDiaz..!! – alekhine Jun 3 '14 at 16:53