Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have borrowed the following code to draw a spiral using one of the existing posts in TEX.SE.

\begin{tikzpicture}
\draw [domain=0:25.1327,variable=\t,smooth,samples=55]
    plot[mark=*,mark options={fill=white}] ({\t r}: {0.002*\t*\t});
\end{tikzpicture}

enter image description here

As seen, nodes in the resulting spiral get closer and closer as they approach the center. What I'd like to have is to specify a set of nodes on the spiral that are equally distant from their adjacent ones. That is, they do not get closer to each other towards the center as in the figure above. The resulting spiral can be assumed as an approximation of the existing one which of course would no longer be looking smooth.

share|improve this question
5  
Like this? –  Tom Bombadil Jun 24 '13 at 23:06
1  
Which distance is meant? The one as in the TeXample linked by Tom Bombadil and Jake’s answer (direct straight line) or along the path? –  Qrrbrbirlbel Jun 25 '13 at 1:41

2 Answers 2

up vote 4 down vote accepted

If you don't need to reproduce your existing spiral exactly, you can use a path with a constant segment length and a corner angle that increases with the square root of the distance:

\documentclass[border=5mm]{standalone}

\usepackage{tikz}

\begin{document}
\begin{tikzpicture}

\draw  (0,0) \foreach \t in {0.1,0.2,...,3}{
  -- ++({sqrt(\t)*700}:0.4cm)
};
\draw [fill=white] circle [radius=1pt] (0,0) \foreach \t in {0.1,0.2,...,3}{
   ++({sqrt(\t)*700}:0.4cm) circle [radius=1pt]
};

\end{tikzpicture}


\end{document}
share|improve this answer
    
Based on your statement "a corner angle that increases with the square root of the distance" and your defined \t variable, I think \t does not represent any geometrical distance. What do you think of it? –  Please don't touch Jun 25 '13 at 2:03
    
@mozartstraße: \t is proportional to the distance travelled along the path, since each segment has the same length (0.4cm). –  Jake Jun 25 '13 at 2:06
    
Okey. Thank you. –  Please don't touch Jun 25 '13 at 2:11

With PSTricks. Just for fun!

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{multido,pst-node}
\begin{document}
\begin{pspicture}[showgrid](-5,-5)(5,5)
\def\points{}%
\multido{\r=0.0+0.1}{90}{\xdef\points{\points(!1 \r\space sqrt 700 mul PtoC)}}
\psset{showpoints,dotstyle=o,dotscale=2}
\rput(-1,0){\expandafter\psrline\points}
\end{pspicture}
\end{document}

enter image description here

share|improve this answer
1  
it's funny that you're going to have the tikz gold badge before the one for pstricks :) +1 –  cmhughes Jun 25 '13 at 3:05
    
@cmhughes: You are a good analyst. Thank you! –  Please don't touch Jun 25 '13 at 4:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.