Graphics, Figures & TablesCoil around a circular path/disc/toroid

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ZeV
Posts: 7
Joined: Sat Feb 26, 2011 12:06 pm

Coil around a circular path/disc/toroid

Post by ZeV »

One can fairly easily draw a rather neat coil around a core of one's choosing, for example like this

Code: Select all

\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
	\draw (-1.9,.15) .. controls (-1.3,.25-0.3) and (1.3,.55) .. (1,.25);
	\draw[fill=yellow] (-1,-1) rectangle (1,5);
	\draw (-1.9,4.15) .. controls (-1.3,4.25-0.3) and (1.3,4.55) .. (1,4.25);
	\foreach \y in {.25,.3,...,4.25}
	\draw (-1,\y) .. controls (-1.3,\y-0.3) and (1.3,\y+.3) .. (1,\y);	
\end{tikzpicture}
\end{document}
But, if you want the coil to be spun around a shape with a less simple geometry than a rectangle, I'm afraid I'm a little curious as to the best procedure.

Can anyone give me some pointers?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply