# 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...)

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$.

• The range ought to be $\sqrt{1/2} \le x \le 2$, right? Commented May 11, 2016 at 19:59
• that's fantastic, thank you so much! Would this be easy to rewrite as a (parametric) expression of $\theta$? Commented May 11, 2016 at 20:07
• @NominalAnimal Thanks for catching that typo. I corrected it. Commented May 11, 2016 at 21:15
• @Mike'Pomax'Kamermans: I wrote a more convoluted derivation, but ending up with the same exact answer. I show various expressions along the way that might be useful. Note, however, that this (Robert Israel's) answer, in my opinion, is the better one. I see mine as useful to those who don't immediately see how Robert solved this, and might need additional intermediate steps. I think. :) Commented May 11, 2016 at 22:04

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)$.

• extra analyses are always appreciated, so while I'll keep Robert's answer as the accepted one, have a +1, and thanks, from me =) Commented May 11, 2016 at 22:06
• Thanks! Also, I took a quick glance at the $r_1 \ne 1$ and $r_2 \ne 1$ cases using Maple, but the expressions quickly become very complicated. (If I had to work with different sized doors, I do believe scaling the sizes so that $r_2 = 1$ first, should yield tractable expressions.) In real life, it'd probably take less time to create a small test jig to draw it out, than to even type all that math into Maple or Mathematica.. Commented May 11, 2016 at 23:10
• yeah, for real widths, a jig or even just a quick bit of visual programming makes a lot of sense; for clean formulae, unit values for $r_1$ anf $r_2$ are fine. Commented May 12, 2016 at 0:23