TeX - LaTeX Asked by ltxEnthu on June 6, 2021
I am trying to create an ellipse (split) using tikz and arc command.
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}
Kindly suggest corrections to create correct split ellipse.
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}
Correct answer by Roland on June 6, 2021
Following code generated required image. Thank you all. I now better appreciate the scope and scale commands.
% 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}
Answered by ltxEnthu on June 6, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP