# Model of a rotary joint driven by a linear motor [Part 3]

## Coordinates of motor

### Coordinates of A

To compute the torque as a function of the motor length, we'll need the expression of the vector $$\overrightarrow{AB}$$. Let's start by calculating the coordinates of $$A=(x_A, y_A)$$:

$$\begin{split} x_A = | \overrightarrow{OA} | \times \cos ( \pi - \alpha ) \\ y_A = | \overrightarrow{OA} | \times \sin ( \pi - \alpha ) \end{split}$$

Since $$\cos(\pi-\theta) = -\cos(\theta)$$ and $$\sin(\pi-\theta) = \sin(\theta)$$, the previous expression can be simplified:

$$\begin{split} x_A &=& -| \overrightarrow{OA} | \times \cos ( \alpha ) \\ y_A &=& | \overrightarrow{OA} | \times \sin ( \alpha ) \end{split}$$

### Coordinates of B

To get the coordinates of point $$B$$, we will calculate the intersection of circle $$C_1$$ and $$C_2$$:

• $$C_1$$ is a circle of center $$A$$ and radius $$| \overrightarrow{AB} |$$
• $$C_2$$ is a circle of center $$C$$ and radius $$| \overrightarrow{CB} |$$

You'll find a detailed demonstration of the intersections calculation on this page: How to calculate the intersection points of two circles?.

The distance between centers $$| AC |$$ is given by:

$$d = | \overrightarrow{AC} | = \sqrt {| \overrightarrow{BC} |^2 + | \overrightarrow{BA} |^2 }$$

• if $$d > | \overrightarrow{BA} | + | \overrightarrow{BC} |$$ the circles are too far apart and do not intersect;
• if $$d < | | \overrightarrow{BA} | - | \overrightarrow{BC} | |$$ one circle is inside the other and do not intersect;
• if $$d = 0$$ and $$\left| \overrightarrow{BA} | = | \overrightarrow{BC} \right|$$ the circles are merged and there are an infinite number of points of intersection;
• if $$d = | \overrightarrow{BA} | + | \overrightarrow{BC} |$$ there is a single intersection point;
• if $$d < | \overrightarrow{BA} | + | \overrightarrow{BC} |$$ there are two intersection points.

In the three first cases, there is no solution. The coordonates of point $$B$$ is given by:

$$\begin{split} x_B &=& ~ x_1 ~\pm~ \dfrac{h}{d}(y_C - y_A) \\ y_B &=& ~ y_1 ~\pm~ \dfrac{h}{d}(x_C - x_A) \end{split}$$

where:

• $$a = \dfrac{| \overrightarrow{AB} |^2 - | \overrightarrow{BC} |^2 + d^2 }{2d}$$
• $$h = \sqrt{ | \overrightarrow{AB} |^2 - a^2 }$$
• $$x_1 = x_A + \dfrac{a}{d} \times ( x_C - x_A )$$
• $$y_1 = y_A + \dfrac{a}{d} \times ( y_C - y_A )$$