# Expanding the robot

Our initial simplification had the robot a point - well, the ropes met a point. The real robot has dimensions, and the ropes are tied to four corners of the robot. Let's assume:

- a box, with the ropes tied to the upper face, and the claw at the centroid of the lower face
- the box dimensions are $2b \times 2d \times h$ 
  - the factor of 2 is for convenience in the equations: instead of $x - \frac{b'}{2}$, we can use $x - b$
- the claw is at $(x, y, z)$.




Then, our original equations for $l_i$ become:

$$
\begin{align}
l_1^2 &=& (0 - (x - b))^2 + (0 - (y - d))^2 + (H - (z + h))^2 &=& (x - b)^2 + (y - d)^2 + (H - h - z)^2 \\
l_2^2 &=& (0 - (x - b))^2 + (D - (y + d))^2 + (H - (z + h))^2 &=& (x - b)^2 + (D - d - y)^2 + (H - h - z)^2 \\
l_3^2 &=& (B - (x + b))^2 + (D - (y + d))^2 + (H - (z + h))^2 &=& (B - b - x)^2 + (D - d - y)^2 + (H - h - z)^2 \\
l_4^2 &=& (B - (x + b))^2 + (0 - (y - d))^2 + (H - (z + h))^2 &=& (B - b - x)^2 + (y - d)^2 + (H - h - z)^2
\end{align}
$$

As before, we can subtract pairs of equations to eliminate two of $x, y, z$ and get the remaining one:


$$
\begin{align}
l_1^2 - l_2^2 &=& (y - d)^2 - (D - d - y)^2 \\ 
 &=& (y - d + D - d - y)(y - d - D + d + y)\\ 
 &=& (D - 2d)(D + 2y) \\
\therefore y &=& \frac{1}{2}\left(\frac{l_1^2 - l_2^2}{D - 2d} - D\right)
\end{align}
$$

Similarly, for $x$:


$$
\begin{align}
l_2^2 - l_3^2 &=& (x - b)^2 - (B - b - x)^2 \\ 
 &=& (x - b + B - b - x)(x - b - B + b + x)\\ 
 &=& (B - 2b)(B + 2x) \\
\therefore x &=& \frac{1}{2}\left(\frac{l_2^2 - l_3^2}{B - 2b} - B\right)
\end{align}
$$

While the equations for $x$ and $y$ have changed a bit, the constraint on the rope lengths remains the same:

$$
l_1^2 - l_2^2 = l_4^2 - l_3^2
$$


```python

```

235342f8bb499d7c679b8e7a4a7fea171874ae8f
ipynb
Jupyter Notebook
Suspended_Robot/Paperwork.ipynb
Machine-Learning-Tokyo/Agritech
855569561140bb06a13cce81495673bea471cbd0
Apache-2.0
2019-07-29T23:16:44.000Z
2022-03-02T14:08:47.000Z
Suspended_Robot/Paperwork.ipynb
Machine-Learning-Tokyo/Agritech
855569561140bb06a13cce81495673bea471cbd0
Apache-2.0
2019-08-21T02:59:05.000Z
2019-08-25T09:28:40.000Z
Suspended_Robot/Paperwork.ipynb
Machine-Learning-Tokyo/Agritech
855569561140bb06a13cce81495673bea471cbd0
Apache-2.0
2021-01-11T01:06:22.000Z
2021-01-11T01:06:22.000Z
Qwen/Qwen-72B
1. YES
2. YES