0

To draw an arc in a tikzpicture, we have the following syntax:

\draw (<starting point>) arc (starting angle:ending angle:radius);

This definition gives me trouble to draw the arc because I am not able to guess the symmetry of the arc so easily. Instead of this, the following definition would comfort me to a huge extent.

\draw (<center of the arc>) arc (starting angle:ending angle:radius);

How can I redefine the arc command to perform like this? Of course, it goes without saying that all the draw options like thickness, colour, arrowhead types must be retained.

PS: I feel that the second one is a more organic syntax for the same. Any insight on why I may be wrong will be highly appreciated.

  • 1
    \draw (<center of the arc>)++(<polar or cartesian move to start point>) arc (starting angle:ending angle:radius); – koleygr Oct 04 '20 at 16:51
  • @koleygr Thanks. This works! Two requests. Please refer the proper place in the Tikz manual where I can find the explanation of this. Secondly, can you please comment on my PS question? – Subhajit Paul Oct 04 '20 at 17:02
  • 2
    Section 13.4.1 Relative coordinates, if you mean the ++. – Torbjørn T. Oct 04 '20 at 17:06
  • Sorry ... can't really help you an any of your requests ... I haven't read the tikz manual yet ... and the syntax of each command in a package is something that is defined according to the creator's taste and thinking about the usage ... I could say that for example... if you try to create a closed surface (let's say with fill command) the way that is already defined ... is better ... So, seems more appropriate for such cases because you can use continued (closed) lines .... – koleygr Oct 04 '20 at 17:08
  • 1
    By the way, see also https://tex.stackexchange.com/questions/66216/ – Torbjørn T. Oct 04 '20 at 17:12

1 Answers1

1

The answer to your P.S. question certainly is that you can chain several operations on a path (for example with \draw) and the starting point of each operation is the end point of the previous operation.

Like so:

\documentclass[tikz, border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
  \draw (0,0) -- (1,0) arc (0:90:1cm) -- cycle;
\end{tikzpicture}
\end{document}

It wouldn't make much sense if you had to move to the arc's center first.

Frunobulax
  • 2,218