21

I need to combine an involute (https://en.wikipedia.org/wiki/Involute) of a circle and an archimedean spiral in one TikZ drawing, but have a problem drawing the involute.

I need something like this:

spiral and involute

Here is my code:

\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}

\usepackage{fp}
\usetikzlibrary{fixedpointarithmetic}

\begin{tikzpicture}[x=1mm, y=1mm]

    \draw[] (0, 0) circle (7mm);

    \draw[rotate=-90, blue, domain=0:2*pi, variable=\a, samples=500]
            plot[fixed point arithmetic] ({\a r}:{7*sqrt(1+pow(\a, 2))});   

    \draw[rotate=-90, red, domain=0:2*pi, variable=\a, samples=500]
        plot[fixed point arithmetic] ({\a r}:{(7*\a)});
\end{tikzpicture}

And the output is:

output

Found my error, here is the code for involute and the circle:

    \def\r{7}

    % Circle
    \draw[line width=0.1mm, domain=0:2*pi, variable=\t, samples=500] 
        plot[fixed point arithmetic] ({\r*cos(deg(\t))}, {\r*sin(deg(\t))});

    % Involute
    \draw[blue, line width=0.1mm, domain=0:2*pi, variable=\t, samples=500] 
        plot[fixed point arithmetic] ({\r*(cos(deg(\t))+\t*sin(deg(\t)))}, {\r*(sin(deg(\t))-\t*cos(deg(\t)))});

    % Spiral
    \draw[red, rotate=-90, line width=0.1mm, domain=0:2*pi, variable=\t, samples=500]
        plot[fixed point arithmetic] ({\t r}:{(7*\t)});

And the fixed output is:

fixed

19

I would use PGFPlots for this:

\documentclass{article}    \usepackage{pgfplots}
\pgfplotsset{compat=1.12}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
    trig format plots=rad,
    samples=300,
    axis equal image,
    xtick=\empty, ytick=\empty,
    axis lines=middle, enlargelimits=true
]
\addplot [
    no markers,
    black,
    thick,
    domain=0:6.4844*pi
] ( {cos(x) + x*sin(x)}, { sin(x) - x*cos(x)} );
\addplot [
    no markers,
    red,
    thick,
    domain=0:6*pi
] ( {x * cos(x)}, { x* sin(x) } );
\end{axis}
\end{tikzpicture}
\end{document}
13

Without PGFPlots :

\documentclass[tikz,border=7mm]{standalone}
\begin{document}
  \begin{tikzpicture}[scale=.2,samples=200,smooth,thick]
    \draw[blue,domain=0:3*360+87] plot ([rotate=\x]1,-rad \x);
    \draw[red,domain=0:3*360] plot (\x:rad \x);
  \end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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