2

I am trying to create an ellipse (split) using tikz and arc command. enter image description here

Semi-major axis a = 5 Semi-minor axis b = 3

Coordinates of various points: O(0,0); A(4.797,0.846); B(0.526,2.983); C(-0.526,2.983); D(-4.797,0.846); E(-4.797,0.846); F(-0.526,-2.983); G(0.526,-2.983); H(4.797,-0.846);

Angle made by OA with x-axis is 10 degree Angle made by OB with x-axis is 80 degree Angle made by OC with x-axis is 100 degree Angle made by OD with x-axis is 170 degree Angle made by OE with x-axis is 190 degree Angle made by OF with x-axis is 260 degree Angle made by OG with x-axis is 280 degree Angle made by OH with x-axis is 350 degree

I have used the following and the result also attached.

\begin{tikzpicture}
\draw (4.797,0.846) arc(10:80:5cm and 3 cm); \draw (-0.526,2.983) arc(100:170:5cm and 3 cm); \end{tikzpicture}

enter image description here

Kindly suggest corrections to create correct split ellipse.

2 Answers 2

2

May I suggest that you just mirror one ellipse with scope: For the lines that became thicker i used \edge.

\documentclass[border=3.41mm]{standalone}
\usepackage{tikz}
\begin{document}
    

\begin{tikzpicture}
    
    %axis
    \draw (0,-8) -- (0,8);
    \draw[] (-8,0)-- +(15,0) edge[thick] (8,0);
    
    % original ellipse
    \draw[thick] (4.797,0.846) arc(10:80:5cm and 3 cm);
    \node[xshift=5pt,yshift=-10](a) at (4.79,0.85) {A};
    \node[yshift=5pt,xshift=-10pt](b) at (0.75,3.28) {B};

    \draw[] (0,0)-- +(4.79,0.85) edge[thick] (8,1.45); % A line
    \draw[] (0,0)-- +(0.75,3.28) edge[thick] (1,4.5); % B line
    \draw[<->,>=stealth] (8,0) arc(0:28:2cm and 3 cm) node[midway,xshift=10pt]{10°};
    \draw[<->,>=stealth] (7,0) arc(0:80:7.25cm and 4.5 cm) node[midway,yshift=10pt]{80°};

    % mirror ellipse
    \begin{scope}[yscale=1,xscale=-1]
        \draw[thick] (4.797,0.846) arc(10:80:5cm and 3 cm);
        \node[xshift=-5pt](a) at (4.79,0.85) {D};
        \node[yshift=5pt](b) at (0.75,3.28) {C};
        \draw[] (4.79,0.85) -- (0,0);
        \draw[] (0.75,3.28) -- (0,0);
    \end{scope}

    % mirror ellipse
    \begin{scope}[yscale=-1,xscale=-1]
        \draw[thick] (4.797,0.846) arc(10:80:5cm and 3 cm);
        \node[xshift=-5pt](a) at (4.79,0.85) {E};
        \node[yshift=-5pt](b) at (0.75,3.28) {F};
        \draw[] (4.79,0.85) -- (0,0);
        \draw[] (0.75,3.28) -- (0,0);
    \end{scope}

    % mirror ellipse
    \begin{scope}[yscale=-1,xscale=1]
        \draw[thick] (4.797,0.846) arc(10:80:5cm and 3 cm);
        \node[xshift=5pt](a) at (4.79,0.85) {G};
        \node[yshift=-5pt](b) at (0.75,3.28) {H};
        \draw[] (4.79,0.85) -- (0,0);
        \draw[] (0.75,3.28) -- (0,0);
    \end{scope}

    \node[xshift=7pt,yshift=-7pt](o) at (0,0) {O};
    
\end{tikzpicture}

\end{document}

enter image description here

2
  • Thank you, your solution works!
    – ltxEnthu
    Mar 23, 2021 at 3:24
  • 1
    I recommend you use polar coordinates for all of your coordinates. For example, point A at (4.79,0.85) can be replaced with (10:5 and 3).
    – Sandy G
    Mar 23, 2021 at 3:59
0

Following code generated required image. Thank you all. I now better appreciate the scope and scale commands.enter image description here

% original ellipse
\draw[line width=1.5pt] (10:5 and 3) arc(10:80:5cm and 3 cm);

% mirror ellipse
\begin{scope}[yscale=1,xscale=-1]
    \draw[line width=1.5pt] (10:5 and 3) arc(10:80:5cm and 3 cm);
\end{scope}

% mirror ellipse
\begin{scope}[yscale=-1,xscale=-1]
    \draw[line width=1.5pt] (10:5 and 3) arc(10:80:5cm and 3 cm);
\end{scope}

% mirror ellipse
\begin{scope}[yscale=-1,xscale=1]
    \draw[line width=1.5pt] (10:5 and 3) arc(10:80:5cm and 3 cm);
\end{scope}
1
  • \draw[line width=1.5pt, delta angle=70, x radius=5, y radius=3] foreach \stAng in {10, 100, 190, 280} { (\stAng: 5 and 3) arc[start angle=\stAng] }; Oct 20, 2022 at 11:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .