Determining the angled distance in a trapezoid I have an isosceles trapezoid that is angled at its center. All known dimensions are, theta, bases, distance from the horizontal line, and the overall height of the trapezoid.
I'm looking for an equation to determine the length of the horizontal lines going from one end to the other end of the trapezoid (marked in black in the picture below). 
Any clues are appreciated.

 A: 
Let $\space\mathrm{height\space of\space the \space trapezoid}=PQ=2h$, $\space\mathrm{its\space smaller\space base}=2a$, $\space\mathrm{its\space larger\space base}=2b\space$, and $\mathrm{distance\space to\space the\space lower\space horizontal\space line}\space =OE=d$. As shown in the diagram, each inclined side of the trapezoid makes an angle $\phi$ with its larger base. The center of the trapezoid is $O$. The trapezoid is tilting to an angle of $\theta$ from the vertical.
The angle $\phi$ can be expressed as,
$$\phi=\tan^{-1}\left(\frac{2h}{b-a}\right) \tag{0}$$
It is required to express the length of the lower horizontal line $AB$ as a function of $h$, $a$, $b$, $d$, and $\theta$. But first, as shown below, we express it in terms of four line segments. The idea is to find their lengths separately and then put them together to determine the length of $AB$.
$$AB=CE-CA+ED+DB \tag{1}$$ 
Since the given quadrilateral is an isosceles trapezoid, we have,
$$OM=ON=\frac{a+b}{2}.$$
From our diagram it is evident that $ED=OS$ and $CE=OR$. 
By applying sine-rule to the triangle $OMS$, we get,
$$ED=OS=OM\frac{\sin\left(180^{0}-\phi\right)}{\sin\left(\phi-\theta\right)}=\left(\frac{a+b}{2}\right)\frac{\sin\left(\phi\right)}{\sin\left(\phi-\theta\right)}. \tag{2}$$
Similarly, applying sine-rule to the triangle $ONR$ yields,
$$CE=OR=OM\frac{\sin\left(\phi\right)}{\sin\left(180^{0}-\phi-\theta\right)}=\left(\frac{a+b}{2}\right)\frac{\sin\left(\phi\right)}{\sin\left(\phi+\theta\right)}.\tag{3}$$
By consider the right-angle triangle $SDB$, we can express $DB$ as,
$$DB=\frac{d}{\tan\left(\phi-\theta\right)}. \tag{4}$$
Similarly, the expression given below for $CA$ follows from the right-angle triangle $RCA$.
$$CA=\frac{d}{\tan\left(180^{0}-\phi-\theta\right)}=-\frac{d}{\tan\left(\phi+\theta\right)} \tag{5}$$
We substitute values from equations (2), (3), (4), and (5) in the equation (1) to get the required answer as,
$$AB=\left(\frac{a+b}{2}\right)\left(\frac{\sin\left(\phi\right)}{\sin\left(\phi-\theta\right)}+\frac{\sin\left(\phi\right)}{\sin\left(\phi+\theta\right)}\right)+\frac{d}{\tan\left(\phi-\theta\right)} +\frac{d}{\tan\left(\phi+\theta\right)}. \tag{6}$$
The length of the other horizontal line $GH$ can be determine likewise or, as shown below, by considering the trapezoid $ABGH$.
$$GH=OR+OS+CA-DB$$
Therefore,
$$GH=\left(\frac{a+b}{2}\right)\left(\frac{\sin\left(\phi\right)}{\sin\left(\phi-\theta\right)}+\frac{\sin\left(\phi\right)}{\sin\left(\phi+\theta\right)}\right)-\frac{d}{\tan\left(\phi-\theta\right)} -\frac{d}{\tan\left(\phi+\theta\right)} \tag{7}$$
Both formulae can be simplified. I leave that to you.
These formulae are valid if and only if
$$d\leq h\cos\left(\theta\right)-b\sin\left(\theta\right).$$ 
This also implies 
$$\theta\leq \tan^{-1}\left(\frac{h}{b}\right).$$
The equations (6) and (7) can be easily verified by applying them to an upright trapezoid (i.e. $\theta=0$) or a rectangle (i.e. $a=b$ and $\phi=90^0$) tilted by an angle $\theta$.
