I'm doing some work on pipe thicknesses. I have to find the minimum wall thickness possible of a pipe at a given point from four tjhicknesses as shown in the picture below. (The circles are meant to be offset from each other as shown)

I have tried calculating at each angle using trig.

Outside circle:

$\displaystyle x1 = a*cos(\theta)

y1 = a*cos(\theta)$

Inside circle:

$\displaystyle x2 = b*cos(\theta)+c

y2 = b*cos(\theta)+d$

With the wall thickness being

$\displaystyle f(\theta) = (x1 - x2)^2 + (y1-y2)^2$

Substituting gives

$\displaystyle f(\theta) = 2*(b*c-a*c)*cos(\theta) + 2*(b*d-a*d)*sin(\theta) + (a^2+b^2+c^2+d^2-2*a*b)$

$\displaystyle f(\theta) = A*cos(\theta) + B*sin(\theta) + C$

Using matrix division these variables can be calculated.

$\displaystyle \left(\begin{array}{ccc}1&0&1\\0&1&1\\-1&0&1\\0&-1&1\end{array}\right)$ $\displaystyle \left(\begin{array}{cc}A\\B\\C\end{array}\right)=$ $\displaystyle \left(\begin{array}{cc}w0\\w1\\w2\\w3\end{array}\r ight)$

I've also taken into account the fact that if the solution is one of the four measured widths that this doesn't work.

Unfortunately this is still giving the wrong answer, I suspect it might be partially down to the fact that as you can see in the original picture the angles that the measurements intersect the circles is not the same which is assumed in these calculations.

Can you guys think either of a way to fix my broken set of equations or an entirely different way to solve the problem? I'm finding what seems like a fairly simple problem deceptively difficult.

Thanks, Matt.