Update1
I discovered that the bountary of a series of ellipses consists of the following three parts
Part (I): the first ellipse's effective black-segment;
Part (II): the effective envelope-points of the ellipes from the second to last second;
Part (III): the last ellipse's effective red-segment;
Given that there are $n$ ellipses $E_1,E_2,\cdots,E_n$ on the plane.
For the first ellipse $E_1$, the black segment that outside the ellipse $E_i(i=2,\cdots,n)$ is effective;
For the envelope-point that on the ellipse $E_i(i=2,\cdots,n-1)$, the envelope-point $\theta_i$ that outsides the ellipse $E_j(j=1,\cdots,i-1,i+1,\cdots,n)$ is effective;
For the last ellipse $E_n$, the red segment that outside the ellipse $E_i(i=1,\cdots,n-1)$ is effective;
Data
For a ellipse, which owns the following parametric formula
$\begin{cases} x=a \sin\theta+b \cos\theta +c \\ y=d \sin\theta +e \cos\theta +f \\ \end{cases}$
where, $\theta \in [0,2\pi]$
matThetaList =
{{{{-0, -5, 0}, {-5.2203, 0, 1.7945}}, {2.4798, 5.7546}},
{{{-0.8583, -4.9384, 0.1765}, {-5.4189, 0.7822, 2.3088}}, {3.1275, 6.2599}},
{{{-1.8203, -4.7553, 0.2473}, {-5.6022 , 1.5451, 3.0486}}, {0.7316, 3.3481}},
{{{-2.9427, -4.4550, 0.3147}, {-5.7755, 2.2700, 4.0578}}, {1.1944, 3.4426}}};
here, the variable matThetaList
stores the ellipse $E_i$'s coefficient $\{\{a_i,b_i,c_i\},\{d_i,e_i,f_i\}\}$ and envelope-points $\theta_i^1,\theta_i^2$
Namely, matThetaList=
$\{ \\
\{\{\{a_1,b_1,c_1\},\{d_1,e_1,f_1\}\},\{\theta_1^1,\theta_1^2\}\},\\
\{\{\{a_2,b_2,c_2\},\{d_2,e_2,f_2\}\},\{\theta_2^1,\theta_2^2\}\},\\
\cdots \\
\}$
I have implemented this in the Answer, However, owing to the function FindBoundary[]
will be called many times, the performance of my function is very slow.
So I would like to know:
- Is there other more better/efficient algorithm to solve the boundary of the Ellipses $E_1,\cdots,E_n$?.
Update2
For the general case(all the sections are the complete ellipse), RunnyKine's solution works well and it was very fast. However, when the section was a partial ellipse, that solution failed. Here is a partial ellipse case
(*data for ellipse segments*)
(*About ellipsePoints[], please see my answer below*)
ellipseMat =
{{{0.,-5.,0.},{-5.22027,0.,0.294118}},
{{-0.418837,-4.98459,0.228686},{-5.32183,0.392295,-0.033668}},
{{-0.858274,-4.93844,0.325822},{-5.41893,0.782172,-0.364501}},
{{-1.32336,-4.86185,0.291034},{-5.51219,1.16723,-0.688098}},
{{-1.82027,-4.75528,0.123195},{-5.60223,1.54509,-0.994631}},
{{-2.35676,-4.6194,-0.179982},{-5.68973,1.91342,-1.27478}},
{{-2.94275,-4.45503,-0.622558},{-5.77547,2.26995,-1.5198}},
{{-3.59125,-4.2632,-1.2113},{-5.86038,2.61249,-1.72161}},
{{-4.31974,-4.04509,-1.95715},{-5.94562,2.93893,-1.87293}},
{{-5.15241,-3.80203,-2.8775},{-6.0327,3.24724,-1.96744}},
{{-6.12372,-3.53553,-4.00001},{-6.12372,3.53553,-2.00001}}};
ellipseDomain =
{{2.38622,7.03856},{2.49067,6.93411},{2.57819,6.84659},{2.65607,6.76871},
{2.72819,6.69659},{2.79696,6.62782},{2.86409,6.56069},{2.93095,6.49383},
{2.99873,6.42605},{3.06856,6.35622},{3.1416,6.28318}};
Graphics[Line[Append[#, First@#]] & /@
MapThread[ellipsePoints, {ellipseMat, ellipseDomain}]]
When I sampling more sections($300$), I discovered that the boundary should be as below: