Real world geometry question: garage door 
I have a garage door which represented by the bad quality drawing above.
When the door (red bar) is closed, it is vertical, the bottom is at position B0 and top at T0.
When I open the door, the bottom slides up vertically, the top slides right horizontally.
In position B1/T1, the door is at a 30 degrees angle from it's closed (vertical) position. When in position B2/T2, at an angle of 60 degrees.
When it is full open, the door is horizontal, the bottom being at T0.
I want to build some shelves that will fit below the door, so the shelves must not reach the purple area in the drawing.
I want to find an equation that defines the border between the purple and white area, so I can use it to compute my shelves maximal height, given it's x position on the ground.
This is a real practical question, so the plain answer is alright but some details will help me at least to get rid of the dust in my geometry.
 A: I think the equation is $x^{2/3}+y^{2/3}=1$.  
$\color{blue}{\text{The door has length $1$, so if the ends are at $(X,0)$ and $(0,Y)$, we have $X^2+Y^2=1$, so for some $\theta$,}}$
the ends of the door are at $(\cos\theta,0)$ and $(0,\sin\theta)$.
$\color{blue}{\text{The equation of the line through those points is}}$
The equation of the door is $\frac x{\cos\theta}+\frac y{\sin\theta}=1$.
$\color{blue}{\text{We want the equation of the curve cut out by the door. }}$ $
\color{blue}{\text{Take a value of $x$, and find the greatest $y$ reached by the door as $\theta$ varies.  }}$
Rewrite the equation of the door, $$y=\sin\theta\left(1-\frac x{\cos\theta}\right)=\sin\theta-x\tan\theta$$ 
The largest $y$ value, as $\theta$ rotates, is when 
$$0=\frac {dy}{d\theta}=\cos\theta -x\sec^2\theta\\x=\cos^3\theta\\y=\sin\theta\left(1-\frac x{\cos\theta}\right)=\sin^3\theta$$
$\color{blue}{\text{So the $y$ is highest when $\theta$ is the angle for which $x=\cos^3\theta$; the height it reaches is $\sin^3\theta$}}$
So the shape traced out is $(\cos^3\theta,\sin^3\theta)$, or $x^{2/3}+y^{2/3}=1$.
A: At each moment, the door is the hypotenuse of a right triangle, i.e., if the horizontal edge is $a$ and the vertical is $b$ then we always have $a^2+b^2=c^2$ with varying $a,b$ but with fixed $c$.
Taking the vertex as origin, a point $(x,y)$ ($x>0$, $y<0$) is on the hypotenuse if $\frac ab=\frac{x}{b+y}$.
So $$ y=\frac{bx}{a}-b.$$
As we can write $a=c\cos \phi$, $b=c\sin\phi$ for a suitable angle $\phi$, we obtain
$$ y=x\tan \phi-c\sin \phi.$$
We obtain various $y$ for the same $x$ because it changes while the door moves. We need to look for the minimal value of $y$ for each $x$. This can be found by setting the derivative (with respect to $\phi$) zero:
$$ \frac x{\cos^2\phi}-c\cos\phi=0, $$
so $\cos\phi=\sqrt[3]{\frac xc}$. This makes (with correct sign) $\sin \phi=\sqrt{1-\sqrt[3]{\frac xc}^2}$ and so
$$ \begin{align}y&=\frac{\sqrt{1-\sqrt[3]{\frac xc}^2}}{\sqrt[3]{\frac xc}}\cdot x-\sqrt{1-\sqrt[3]{\frac xc}^2}\cdot c\\
&=\sqrt{\sqrt[3]{{c^2}{x^4}}-x^2}-\sqrt{c^2-\sqrt[3]{x^2c^4}}
.\end{align}$$
Intriguingly, this can be simplified to (cf. Michael's answer)
$$ y=-\sqrt{(\sqrt[3]{c^2}-\sqrt[3]{x^2})^3}.$$
A: Let the height of the door be $h$ and the coordinate system have $x=0$ the vertical plane at the left with $x=h$ being the right (top) end of the door when open.  Let $y=0$ be the ceiling and let $y$ increase downward.  Consider a point F at $(a,0)$.  When the top of the door is at $(b,0)$, the bottom is at $(0,\sqrt{h^2-b^2})$  The $y$ coordinate of G is then at $\frac {b-a}b\sqrt{h^2-b^2}$ as long as $b \ge a$  Taking the derivative and setting to zero gives $ah^2=b^3$ or $b=(ah^2)^{1/3}$ and you need to be $(1-(\frac ah)^{2/3})\sqrt{h^2-(ah^2)^{2/3}}$ down from the ceiling.  Don't forget about the height of the stuff on the shelf.

The original position of the door is AB, the final is BC.  The $a$ is represented by point F, $b$ is represented by E and we are looking to find FG at the E position that maximizes it.  EFG and EBD are similar right triangles.
