1

An error occurs when connecting the path decorations.

! Dimension too large.
<to be read again> 
\relax 
l.12 ...lot[] ({-sin(\t r)}, {cos(\t r) + 5e-2*\t});
                                              
I can't work with sizes bigger than about 19 feet.
Continue and I'll use the largest value I can.

Here's my MWE.

\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{decorations.markings}

\begin{document}
    \begin{tikzpicture}
        \draw [domain=0:2.1*pi,variable=\t,smooth,samples=55, 
        decoration={
            markings,
            mark=at position 0.1 with {\arrow{latex}}}, 
            postaction={decorate}
            ]%
            plot[] ({-sin(\t r)}, {cos(\t r) + 5e-2*\t});
    \end{tikzpicture}
\end{document}

If you comment out a part of the code with postaction=decorate, compilation succeeds. Is it a bug or am I missing something? The problem is not obvious to me.

1 Answer 1

3

When you use smooth option, the point are connected by bezier curves. Bezier curves have control points. Maybe one of these points is falling too far and tikz complains.

A workaround is to disable the smooth option and add more samples.

MWE as follows:

\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{decorations.markings}

\begin{document}
    \begin{tikzpicture}
        \draw [domain=0:2.1*pi,variable=\t,samples=105, 
        decoration={
            markings,
            mark=at position 0.1 with {\arrow{latex}}}, 
        postaction={decorate}
        ]%
        plot[] ({-sin(\t r)}, {cos(\t r) + 5e-2*\t});
    \end{tikzpicture}
\end{document}

Yields: Result without smooth option

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .