I'm working for a firm, who can only use straight lines and (parts of) circles.
Now I would like to do the following: imagine a square of size $5\times5$. I would like to expand it with $2$ in the $x$-direction and $1$ in the $y$-direction. The expected result is a rectangle of size $7\times9$. Until here, everything is OK.
Now I would like the edges to be rounded, but as the length expanding is different in $x$ and $y$ direction, the rounding should be based on ellipses, not on circles, but I don't have ellipses to my disposal, so I'll need to approximate those ellipses using circular arcs.
I've been looking on the internet for articles about this matter (searching for splines, Bézier, interpolation, ...), but I don't find anything. I have tried myself to invent my own approximation using standard curvature calculations, but I don't find a way to glue the curvature circular arcs together.
Does somebody know a way to approximate ellipses using circular arcs?
Thanks
Dominique
Being given any prescribed ellipse curve, it is possible to find a parametric family of circles having this ellipse as its envelope (see figure 2 below). The more circles you take, the more precise you are.
How are these circles obtained? As an oblique projection of level sets of an ellipsoid (Figure 1) with equation:
$$\tag{1}x^2+y^2+\dfrac{z^2}{c^2}=1 \ \iff \ x^2+y^2=1-\dfrac{z^2}{c^2}$$
i.e., as circles of radius $r:=\sqrt{1-\tfrac{z^2}{c^2}}$.
These circles are parametrized by $z$ with parametric equations:
$$(C_z) \ \begin{cases} x=r \cos(u)+z\\y=r \sin(u) \end{cases} \ \ \text{for any } z \in [-c,c].$$
Here is a Matlab program that generates this family of circles (changing the value of parameter $c$ changes the eccentricity of the generated ellipse):
In fact there are two circles with radius 0, i.e., points that are the foci of this ellipse. This will become clearer with the following modification and its physical interpretation :
In fact, one can have more evenly spaced circles (it is in this way that Figure 2 has been generated) by setting $z=c \sin(t)$ for parameter $t \in [-\tfrac{\pi}{2},\tfrac{\pi}{2}]$. It means that the loop in the program above is to be replaced by :
A nice physical interpretation of this new family of circles is as sound waves propagation (see fig. 2) (http://www.math.ubc.ca/~cass/courses/m309-01a/dawson/index.html).
Remarks about machining concerns:
it is easy to retrieve the intersection points of successive circles where the tool must proceed to the next arc (dropping of course certain circles that remain interior to the elliptical envelope).
a better fit can be achieved by introducing tangents between the arcs. A supplementary benefit would be to obtain a smooth curve, but without continuity of the derivative.
Fig. 1: Oblique (45°) projection on plane xOy of the level sets of the ellipsoid (called "prolate spheroid") with equation (1).
Fig. 2: Sound waves propagation interpretation: A sound emmitted from one of the foci of the ellipse is reflected on the ellipse and concentrated in the other focus.