1

Is there anyway using say tikz (preferred, or pstricks would be OK too) to make curved coils? Essentially I want to make beads on a circular wire that are joined by springs. Here are the images I would like to make:

http://i.imgur.com/lh6Ze9I.jpg

A regular coils has small non-coiled segments near the ends of the springs, while the images above do not have such segments. However, I would like to have small straight segments near the ends of the springs if possible.

Julie
  • 21
  • Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document. – Martin Schröder Nov 20 '15 at 18:57
  • 4
    Sorry, this is is my first post and to search on how to make springs I looked at the page http://tex.stackexchange.com/questions/13933/drawing-mechanical-systems-in-latex. That page only put a picture (and not compilable document), so I assumed it was standard practice to put pictures only with no code. I apologize. I should have asked before. This will not happen again. – Julie Nov 20 '15 at 20:09

2 Answers2

7

Your question is one among set of "do-it-for-me" ...

Edit: anyway, @AboAmmar was faster few seconds with the almost the same solution. So In dilema what to do, I first erase my answer, then activate, again erase and on the end, decide due to small diferences activate it.

enter image description here

Above picture is drawn by:

\documentclass[border=3mm,
               tikz,
               ]{standalone}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}

\begin{tikzpicture}[ decoration={coil,amplitude=3mm,segment length=3mm} ] \draw (0,0) circle (2); \draw[decorate,thick,red] ( 95:2) arc ( 95:270:2); \draw[decorate,thick,blue] (-85:2) arc (-85:90:2); \fill[black] (0,-2) circle (3mm) (0, 2) circle (3mm); \draw[thick,<->] (70:2.6) arc (70:110:2.6) node[above,midway] {$F_d(t)$}; \end{tikzpicture} \end{document}

Zarko
  • 296,517
  • I think your solution handles the joins to the beads more effectively. – Thruston Nov 20 '15 at 20:20
  • @Thruston, to be honest, in first I try (unfortunately unsuccessful in short time) to find link between coil amplitude, segment length and circle diameter, so I decide to split circle into two arc, which are easy to manipulate. Ones I will try to derive math expression for this (in spare time) ... – Zarko Nov 20 '15 at 20:27
5

Try this decoration method:

\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}

\scriptsize
\begin{tikzpicture}
\draw (0,0) circle (1cm);
\draw[decorate,decoration={coil,segment length=4pt},rotate=92] (0,0) circle(1cm);
\draw[fill] (0,1) node[above=.2cm]{$F_d(t)$} circle(3pt) (0,-1) circle(3pt);
\draw [<->] (75:1.2cm) arc [radius=1.2cm, start angle=75, end angle=105];
\end{tikzpicture}

\end{document}

enter image description here

AboAmmar
  • 46,352
  • 4
  • 58
  • 127