One can plot this very easily if one knows the polar coordinate representations of the rectangle and ellipse. Here is the asymptote code:
\documentclass[varwidth,border=3mm]{standalone}
\usepackage{asymptote}
\begin{document}
\begin{asy}
settings.outformat="pdf";
import graph;
size(8cm,0);
real rrect(real a,real b,real t) {
return 1/max(abs(cos(t)/a),abs(sin(t)/b)); };
real relli(real a,real b,real t) {
return a*b/sqrt((b*cos(t))**2+(a*sin(t))**2);};
real rrr(real t) {real [] tmp={relli(1.3,0.6,t),rrect(1.2,0.5,t),rrect(0.5,1.2,t),1};
return max(tmp);};
pair f(real t) { return (rrr(t)*cos(t),rrr(t)*sin(t)); }
draw(graph(f, 0, 2*pi, n=721), thick());
\end{asy}
\end{document}

For the explanations, let me switch to TikZ with which I am more familiar.
A rectangle width \a
and height \b
has the polar representation (called rrect
in the asymptote code)
Rplane(\a,\b,\t)=1/max(abs(cos(\t)/\a),abs(sin(\t)/\b));
where \t
is the angle, as illustrated in
\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[declare function={%
Rplane(\a,\b,\t)=1/max(abs(cos(\t)/\a),abs(sin(\t)/\b));}]
\begin{scope}
\draw plot[variable=\t,domain=0:360,samples=361]
(\t:{Rplane(1.2,0.5,\t)});
\draw[red,dashed] (-1.2,-0.5) rectangle (1.2,0.5);
\end{scope}
\begin{scope}[xshift=3cm]
\draw plot[variable=\t,domain=0:360,samples=361]
(\t:{Rplane(0.5,1.2,\t)});
\draw[red,dashed] (-0.5,-1.2) rectangle (0.5,1.2);
\end{scope}
\end{tikzpicture}
\end{document}

An ellipse has the representation (called relli
in the asymptote code)
Rellipse(\a,\b,\t)=\a*\b/sqrt(pow(\b*cos(\t),2)+pow(\a*sin(\t),2));
as illustrated in
\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[declare function={%
Rellipse(\a,\b,\t)=\a*\b/sqrt(pow(\b*cos(\t),2)+pow(\a*sin(\t),2));}]
\draw plot[variable=\t,domain=0:360,samples=361]
(\t:{Rellipse(1.3,0.6,\t)});
\draw[cyan,dashed] (0,0) circle[x radius=1.3,y radius=0.6];
\end{tikzpicture}
\end{document}

So all one needs to do is to plot the maximum of the radius function of the rectangles, ellipse and circle, for which it is just a constant radius.
\documentclass[tikz,border=3mm]{standalone}
\begin{document}
\begin{tikzpicture}[declare function={%
Rplane(\a,\b,\t)=1/max(abs(cos(\t)/\a),abs(sin(\t)/\b));
Rellipse(\a,\b,\t)=\a*\b/sqrt(pow(\b*cos(\t),2)+pow(\a*sin(\t),2));}]
\draw[very thick] plot[variable=\t,domain=0:360,samples=361]
(\t:{max(Rplane(1.2,0.5,\t),Rplane(0.5,1.2,\t),Rellipse(1.3,0.6,\t),1)});
\draw[red,densely dashed] (-1.2,-0.5) rectangle (1.2,0.5);
\draw[orange,densely dashed] (-0.5,-1.2) rectangle (0.5,1.2);
\draw[blue,densely dashed] (0,0) circle[radius=1];
\draw[cyan,densely dashed] (0,0) circle[x radius=1.3,y radius=0.6];
\end{tikzpicture}
\end{document}

buildcyle
function, though.buildcycle
is not working when there are 3 ou more intersections points.E
(andall
) as variable names should be avoided sinceE
is defined as east (-1,0).