Consider the code below:
\documentclass[convert = false]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}
\draw[-latex] (0, 0) ellipse [x radius = 3cm, y radius = 2cm, start angle = 30,
end angle = 150];
\end{tikzpicture}
\end{document}
This code produces no compiling errors but it doesn't acknowledge the start and angle or the arrow option. I could use the command arc
, but then to have the arc
centered at the origin, I would need to define the arc
starting coordinate as
\coordinate (P) at ($(0, 0) + (30:3cm and 2cm)$);
And then draw the arc:
\documentclass[convert = false]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\draw[-latex] (0, 0) ellipse [x radius = 3cm, y radius = 2cm,
start angle = 30, end angle = 150];
\coordinate (P) at ($(0, 0) + (30:3cm and 2cm)$);
\draw[thick, red, -latex] ($(0, 0) + (30:3cm and 2cm)$(P) arc
(30:150:3cm and 2cm);
\end{tikzpicture}
\end{document}
This isn't terribly difficult but is there a way to use the ellipse
command to achieve the desired result?
Best Answer
You can define a new style that automates setting the start coordinate and drawing the arc:
Then you can simply say
to draw the arc: