Maximize the distance between a w shaped line construction and two points I am trying to hang string lights on my rectangular porch in a W-shaped fashion. There are two ceiling fans interrupting the pattern and I need to maximize the distance between the ceiling fan blades and the string lights. The perpendicular distance from the center of each ceiling fan to each line should be equal. I tried to use cad to solve this and I am close but I'd like to get an exact solution if possible. I believe one way to go about it is to use the following Theorem and solve that set of equations along with the equations of the lines. There might also be a derivative involved since we are maximizing something. I began using the theorem and things got pretty nasty right away. I am hoping someone might have a more elegant solution. The unknown variables are x_1, x_2 and x_3.


 A: Just a few suggestions.
Notation: let’s call the four diagonal lines $L1$, $L2$, $L3$, $L4$, and let’s call the circle centers $C1$ and $C2$. Define some distances $d1 = distance(L1, C1)$, $d2 = distance(L2, C1)$, $d3 = distance(L3, C12)$, and $d4 = distance(L4, C2)$. We want $d1=d2=d3=d4$.

*

*Using a CAD system, or even just PowerPoint, you can move the diagonal lines around until the four distances look roughly equal. This would probably be close enough.


*If your CAD system supports constraint solving, you can dimension the four distances, tell the system you want them to be equal, and let the constraint solver do its thing.


*You have the formula for the distance from a point to a line, so you can write three equations that express the requirements $d1 = d2$, $d2=d3$ and $d3=d4$. Now we have to solve these three equations to get $x_1$, $x_2$, $x_3$. Solving these equations by hand is likely to be a big mess, unless someone can spot a clever algebra trick (I can’t). You can try to solve the equations using a computer algebra system like Wolfram Alpha (free) or Mathematica (far from free). If those systems can’t give you an exact algebraic solution, they will at least give you one computed by numerical methods.
A: You'll likely be forced to solve numerically no matter what, but here goes:
I'm assuming the optimal solution will have a radius $r$ from the center $C_1$ to the tangent lines $L_1$ and $L_2$ and similarly for $C_2$. I don't know that that's necessarily the case for the optimum, but it's what I'm going with.
For a given $r$, we can calculate $x_1$ by identifying the angle the tangent line $L_1$ makes with the y-axis.
$$x_1 = 110\tan(\frac{\pi}{2} - \arctan(\frac{55}{105.5})-\arcsin(\frac{r}{\sqrt{55^2 + 105.5^2}}))$$
$x_3$ can be found the same way.
$$x_3 = 292 - 110\tan(\frac{\pi}{2} - \arctan(\frac{55}{81}) - \arcsin(\frac{r}{\sqrt{55^2+81^2}}))$$
Once $x_1$ and $x_3$ are found, we can use the tangent lines $L_2$ and $L_3$ and find their intersections with the top of the rectangle. These won't necessarily agree for a given r, but will give two options $x^L_{2}$ and $x^R_{2}$.
$$x^L_2 = \frac{\sqrt{110^2 + x_1^2} \cdot \sin(2\arcsin(\frac{r}{x_1}))}{\sin(\pi - 2\arcsin(\frac{r}{x_1})-\arctan(\frac{55}{105.5})-\arcsin(\frac{r}{\sqrt{55^2+105.5^2}})}$$
and
$$x^R_2 = 292 - \frac{\sqrt{110^2 + (292-x_3)^2} \cdot \sin(2\arcsin(\frac{r}{x_3}))}{\sin(\pi - 2\arcsin(\frac{r}{x_3})-\arctan(\frac{55}{81})-\arcsin(\frac{r}{\sqrt{55^2+81^2}})}$$
Setting those two equal to each other and solving for $r$ should get you where the tangents meet at a common $x_2$. Barring my tangency assumptions about the optimum being wrong or me misreading the diagram, that gives me $r = 29.6833$, $x_1 = 122.2463$, $x_2 = 149.9779$, and $x_3 = 205.5175$
A: I put it into CAD. Then checked it against the previous solution. Keep in mind that the tolerance is set to 1/64.


Column got in the way!

