3

I need to draw this picture using TikZ:

enter image description here

Main ellipse can be drawn with:

\begin{tikzpicture}
\draw (0,0) ellipse [x radius = 3cm, y radius = 1 cm];
\end{tikzpicture}

Then to make dashed part of that ellipse \draw (x1,y1) arc [start angle=-120, end angle=-240, x radius=3cm, y radius=1 cm] I need to know start point (x1,y1). OK, it can be computed from ellipse equation, but probably arc can be set different way? And the main difficulty for me is how to code that solid tilted up arc?

Many thanks in advance.

  • The tilted arc, is there a specific path it should follow, or do you just need something approximately like that? – Torbjørn T. Mar 13 '17 at 11:45
  • That solid arc shows approximately what we get if we tilt a dashed arc up. So, I need jast a scheme. – Alx Mar 13 '17 at 11:54
4

Instead of figuring out what (x,y) is, draw two separate arcs starting at the same point. The tilted arc can be drawn with the controls syntax.

The reason for the \useasboundingbox at the start is that the control points used for the tilted arc, and likely some used by TikZ to draw the two main arcs, increase the size of the bounding box so you get a lot of whitespace. If you have other things in this diagram, it may or may not be necessary to include it, or the coordinates might have to be adjusted.

enter image description here

\documentclass[border=4mm]{standalone} 
\usepackage{tikz}
\begin{document} 
\begin{tikzpicture}
\useasboundingbox (-1.2,-1.8) rectangle (5,0.3); % coordinates found by trial and error
\draw (0,0) arc[start angle=130,delta angle=-260,x radius=3cm, y radius=1cm];
\draw [dashed] (0,0) arc[start angle=130,delta angle=100,x radius=3cm, y radius=1cm] coordinate (a);

\draw (0,0) .. controls +(-2,1) and +(-0.5,0.5) .. (a);
\end{tikzpicture}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.