Drawing a TikZ arc specifying the center

The TiKz command for an arc:

\draw (0,0) arc (-30:30:2) ;


Draws an arc that starts at (0,0), and would be the part of the circle from -30 degrees to +30 degrees of radius 2.

It is very hard to place these arc sometimes. This is the symbol i want to draw:

(This represents an eye and needs more detail).

I want to draw the arc as _part of a circle with center at where the < meets, but I have to currently fudge the start location of the arc so it properly crosses the < (and it's not even exact).

If I could do a circle from -45 to +45 degrees CENTERED at the <, then that would be much easier.

-
–  Claudio Fiandrino Aug 9 '12 at 16:42

1 Answer

Here is an answer, using the technique described here, with more detail,

\pgfmathsetmacro{\ex}{0}
\pgfmathsetmacro{\ey}{1}

\draw (\ex,\ey) -- ++(-15:1)
(\ex,\ey) -- ++(15:1);
\draw (\ex,\ey) ++(45:.8) arc (45:-45:.8);


The secret to this is in the last line,

\draw (\ex,\ey) ++(45:.8)


Jumps the draw cursor to "the 45 degree position on a circle of radius 0.8", without drawing anything (achieved by using only ++ and not any -- in the command)

Then, from there, we draw an arc

arc (45:-45:.8);


from 45 degrees to -45 degrees, of what would be a circle of radius .8.

Pretty roundabout way to do this, but still it works fine.

Edit:

My finished eye:

\begin{tikzpicture}

%eye
\pgfmathsetmacro{\eyeSize}{1}
\pgfmathsetmacro{\ex}{0}
\pgfmathsetmacro{\ey}{1}
\pgfmathsetmacro{\eRot}{-10}
\pgfmathsetmacro{\eAp}{-55}
\draw[rotate around={\eRot:(\ex,\ey)}] (\ex,\ey) -- ++(-.5*\eAp:\eyeSize)
(\ex,\ey) -- ++(.5*\eAp:\eyeSize);
\draw (\ex,\ey) ++(\eRot+\eAp:.75*\eyeSize) arc (\eRot+\eAp:\eRot-\eAp:.75*\eyeSize);

% IRIS
\draw[fill=gray] (\ex,\ey) ++(\eRot+\eAp/3:.75*\eyeSize) % start point
arc (\eRot+180-\eAp:\eRot+180+\eAp:.28*\eyeSize);

%PUPIL, a filled arc
\draw[fill=black] (\ex,\ey) ++(\eRot+\eAp/3:.75*\eyeSize) % start point
arc (\eRot+\eAp/3:\eRot-\eAp/3:.75*\eyeSize);

\end{tikzpicture}

-