Skip to content

Lack of precision in the stroke of an arrow arc. A bug or an inaccuracy due to TeX calculations? #1422

@quark67

Description

@quark67

Brief outline of the bug

In a draw of an arc with the -> decoration, the path is slightly deformed. This is not the case when the draw has no decoration.

I don't know if this is a little bug or a lack of accuracy of TeX, used by TikZ.

In the next code, there is first a thick arc drawn with a thin arc drawn above it. The paths are the same, and the thin arc is perfectly centred.

In the second example, the thick arc has an arrow at the end. We can notice that in the right part of the draw, the thick arc is not exactly centred at the thin arc. This can be show by a zoom.

But in fact, this is more easily shown if we use double. Like above, the not decorated arc is perfectly centred. But the arc with the -> decoration is not perfectly centred.

Code below.

Image

If we zoom in the second arc, we see a perfect centred arc at the begin of the draw:

Image

But not near the end (here, approximately at 75% from the beginning). We see that the above part is greater than the below part.

Image

It's largely more noticeable in the arc with the double:

At begin, it's perfect:

Image

At end, it's less perfect:

Image

Minimal working example (MWE)

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[line width=2pt, yellow!50!cyan] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\draw[very thin, red] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\end{tikzpicture}

\begin{tikzpicture}
\draw[line width=2pt, ->, cyan] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\draw[very thin, red] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\end{tikzpicture}

\begin{tikzpicture}
\draw[line width=2pt, double, yellow!50!cyan] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\draw[very thin, red] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\end{tikzpicture}

\begin{tikzpicture}
\draw[line width=2pt, double, ->, cyan] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\draw[very thin, red] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\end{tikzpicture}

\end{document}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions