Which function describes the trace of a hinged, 2 segmented slat, with one fixed endpoint? I've been staring at my closet door's trace for a while now, trying to figure out which function describes that trace it makes on the carpet below, and realised I have no idea whether the function that is associated with the geometrical description of the system is a commonly established function that I've simply never heard of (entirely possible, I am not a mathematician, I just do maths recreationally) or whether this is a set of parametric functions that doesn't really have any established research behind it because it's easy to work out and I'm just missing something that'll be obvious oncce explained.
The diagram for the sytem is the following:

We have two connected rigid bodies which for the purposes of maths are simply lines of equal length $R$, connected with a hinge. The left side of the connected pair is anchored, so it can rotate, and the right side of the connected pair is fixed to a rail (set as the x-axis in the diagram), so it can rotate and translate but with the constraint that its end point is always on the rail. As the left side is rotated the right side undergoes a transformation with its endpoints on the circle that the left side traces and the x-axis, and the collective pair "sweeps the floor" and traces the plot of a parametric function.
I would like to express this trace function in terms of the angle of rotation, and it seems appropriate to do this in two parts: the circular part from $\theta = 0$ to $\theta = \frac{\pi}{4}$, and then what looks a lot like a quadratic Bezier, but then over a dilated interval and a non-linear transformation being applied to one of the Bezier coordinates.
Would anyone happen to know the description for this function, or -if it fits a known bit of maths- what the name is that I should be googling for to help myself figure out what the function description is?
(I'm also not entirely sure what the best tags for this question is, so I've used 'geometry' but there's probably a more specific tag I should be using...)
 A: If the length of each segment is $1$, when the angle is $\theta$ the second segment is a straight line from $(\cos \theta, \sin(\theta))$ to $(2 \cos(\theta), 0)$, and has Cartesian equation $F(x,y,\theta) = y \cos(\theta) + x \sin(\theta) - \sin(2\theta) = 0$.  The envelope of these will satisfy
$$\dfrac{\partial F}{\partial \theta} = -y \sin(\theta) + x \cos(\theta) - 2 \cos(2\theta) = 0$$
Letting $\sin(\theta)= s$ and $\cos(\theta) = c$, and eliminating $s$ and $c$ from the equations $$ \eqalign{y c + x s - 2 s c &=0 \cr
                               -y s + x c - 2 (c^2 - s^2) &= 0\cr
                                c^2 + s^2 - 1 &= 0\cr}$$
I get
$$ {x}^{6}+3\,{x}^{4}{y}^{2}+3\,{x}^{2}{y}^{4}+{y}^{6}-12\,{x}^{4}+84\,{x
}^{2}{y}^{2}-12\,{y}^{4}+48\,{x}^{2}+48\,{y}^{2}-64=0
$$
Despite being a sextic, this actually has a nice solution for $y$:
$$ y = \sqrt{4 - 3 (4 x)^{2/3} + 3 (4 x^4)^{1/3} - x^2} $$
where we take this for $1/\sqrt{2} \le x \le 2$.

A: If the hinge is at origin $(0,0)$, the midpoint is at
$$\begin{cases}x_m(\varphi) = r_1 \cos\varphi\\y_m(\varphi) = r_1 \sin\varphi\end{cases}$$
where $\varphi$ is the hinge angle ($0$ for completely closed, $\pi/2$ for completely open) and $r_1$ is the width of the inner door (next to the hinge). If $r_2$ is the width of the outer door, and its other end is on the $x$ axis, it must be at
$$\begin{cases}x_e(\varphi) = r_1 \cos\varphi + \sqrt{r_2^2 - r_1^2 \sin^2\varphi}\\y_e(\varphi) = 0\end{cases}$$or, in other words, at distance $r_2$ from the midpoint.
To simplify things, let us assume $r_1 = r_2 = 1$. Then,
$$\begin{cases}x_m(\varphi) = \cos\varphi\\y_m(\varphi) = \sin\varphi\end{cases}$$$$\begin{cases}x_e(\varphi) = 2\cos\varphi\\y_e(\varphi) = 0\end{cases}$$because $\sqrt{1-\sin^2\varphi} = \cos\varphi$. (Remeber, we have $0 \le \varphi \le \pi/2$).
Let's consider the points that form the outer door. They span from $(x_m(\varphi),y_m(\varphi))$ to $(x_e(\varphi),y_e(\varphi))$,
$$\begin{cases}x_d(t,\varphi) = (1-t)x_m(\varphi) + t x_e(\varphi) = (1+t)\cos\varphi\\
y_d(t,\varphi) = (1-t)y_m(\varphi) + t y_e(\varphi) = (1-t)\sin\varphi\end{cases}$$
where we just interpolate between the outer door endpoints, using $0 \le t \le 1$.
Given some point $x$ and hinge angle $\varphi$, our interpolation variable $t$ is
$$x_d(t,\varphi) = x = (1+t)\cos\varphi \iff t = \frac{x-\cos\varphi}{\cos\varphi} = \frac{x}{\cos\varphi}-1$$
Substituting into $y_d$ we get
$$y_d(x, \varphi) = \left(2 - \frac{x}{\cos\varphi}\right)\sin\varphi = 2\sin\varphi - x\frac{\sin\varphi}{\cos\varphi}$$
or
$$y_d(x, \varphi) = 2\sin\varphi - x\tan\varphi$$
which tells us the $y$ coordinate of the outer door ($x_m(\varphi) \le x \le x_e(\varphi)$) when the hinge angle is $\varphi$.
The points on the curve reach their extremum (minimum or maximum) when the derivative is zero. Here, we are interested in how the hinge angle varies the $y$ coordinates on the outer door:
$$\frac{d y_d(x,\varphi)}{d\varphi} = 0 = 2\cos\varphi - x(1 + \tan^2\varphi) = 2\cos\varphi - \frac{x}{\cos^2\varphi}$$
This has only one real solution where $0 \le \varphi \le \pi/2$:
$$\varphi(x) = \arccos\left(\left(\frac{x}{2}\right)^\frac{1}{3}\right)$$
Note, this function tells us the hinge angle where the outer door is furthest from the wall, at this point $x$. Substituting into $y_d$ we get the equation for the outer doors furthest from the wall,
$$y(x) = y_d(x,\varphi(x)) = \sqrt{4 - (4x)^{2/3}}\left(1 - \left(\frac{x}{2}\right)^\frac{2}{3}\right) = \sqrt{ 4 - 3(4x)^{2/3} + 3(4x^4)^{1/3} - x^2 }$$
Summary:
The maximum distance from the wall as a function of $x$ is
$$y(x) = \begin{cases}
\sqrt{1 - x^2},\; 0 \le x \le \sqrt{\frac{1}{2}}\\
\sqrt{4 - (4x)^{2/3}}\left(1 - \left(\frac{x}{2}\right)^\frac{2}{3}\right), \; \sqrt{\frac{1}{2}} \le x \le 2 \end{cases}$$
The distance from the wall as a function of $x$ and hinge angle $\varphi$ is
$$y(x, \varphi) = \begin{cases}
x \tan\varphi, \; 0 \le x \le \cos\varphi \\
2 \sin\varphi - x \tan\varphi, \; \cos\varphi \le x \le 2\cos\varphi
\end{cases}$$
with $0 \le \varphi \lt \pi/2$. It is a piecewise-defined curve consisting of two lines, from $(0,0)$ to $(\cos\varphi,\sin\varphi)$ to $(2\cos\varphi,0)$.
