Solving for the positions of vertices of 3 line segments I have 3 line segments of lengths p,q,r joined at their ends. Let's call the vertices A, B, C, and D. Suppose D is fixed at the origin. Suppose that A is constrained to move only in the Y direction. Finally, suppose that segments q and r are joined at point C and segments p and q are joined at point B. Thus, there are 3 line segments which are joined at their end points. One end is free to move and the other end is constrained. Please see the attached diagram:
 (Large Version)
I would like to solve for the (x,y) positions of point B and C given a known displacement of point A in the y-dimension.
I have already done this in rectangular coordinates to get 4 equations in 4 variables (Bx,By,Cx,Cy). To solve the position requires solving the system of 4 nonlinear equations.
(1) Would this get simpler in polar coordinates? I'm rusty.
(2) Can anyone provide information on computer algorithms to solve this problem? 
 A: Let $\angle BAD=\theta$, so that $x_B=p\sin\theta$ and $y_B=y_A-p\cos\theta$. Point $C$ can be found as the intersection of the circles having centers at $B$ and $D$ and radii $q$ and $r$ respectively: its coordinates (if they exist) are the solutions of the system
$$
\left\{\eqalign
{(x-x_B)^2+(y-y_B)^2&=q^2\\
x^2+y^2&=r^2
}\right.
$$
In general, for a given value of $\theta$ you'll get two possible positions of $C$ (if $BD<q+r$), or none at all (if $BD>q+r$).
A: OK, so this is just about geometrical constraints, no physical complications like inertia.
We have the position vectors:
\begin{align}
r_A &= (0, y_A) \\
r_B &= (x_B, y_B) \\
r_C &= (x_C, y_C) \\
r_D &= (0, 0) \\
\end{align}
and these constraint equations:
\begin{align}
p^2 &= \lVert r_B - r_A \rVert^2 = x_B^2 + (y_B - y_A)^2 \\
q^2 &= \lVert r_C - r_B \rVert^2 = (x_C-x_B)^2 + (y_C - y_B)^2 \quad (*) \\
s^2 &= \lVert r_D - r_C \rVert^2 = x_C^2 + y_C^2
\end{align}
So we have these unknowns
$$
x_B, y_B, x_C, y_C
$$
as $y_A$ is given. 
Here is a possible parametrization via $(y_A, \varphi)$: 
$$
r_B = (x_B, y_B) = (p \sin\varphi, y_A - p \cos\varphi)
$$
The feasible coordintes for $r_C$ are taken from the intersection
of the two circles for $q$ and $s$ segments, see equations $(*)$.
Interactive Web GeoGebra Worksheet
 (Large Version)
To the right, there are controls to choose the three segment lengths $p, q, s$: 


*

*The $\color{red}{\text{red circle}}$ includes the area where the $p$
segment is allowed, 

*similar a $\color{cyan}{\text{cyan coloured
   circle}}$ for the $q$ segment and 

*the $\color{green}{\text{green circle}}$ for the $s$ segment.


These lengths go into the constraint equations $(*)$ given above.
The possible configuration is influenced by the two parameters:


*

*The $y$ coordinate of the point $A$, $y_a$ which is visualized as a
$\color{red}{\text{purple segment}}$ on the $y$-axis.

*Then we have the $\color{olive}{\text{olive coloured angle } \varphi}$ which can be used to choose all positions for point $B$.
Further we can see the point $D$ which is fixed at the origin $(0,0)$.
So the only point whose positions is determined from the above is the position of the point $C$.
The above image shows a configuration where the 
$\color{cyan}{\text{cyan coloured circle}}$ for the middle $q$ segment does not intersect with the
$\color{green}{\text{green coloured circle}}$ of the lower $s$ segment.
It is not a feasble solution for the constraints.
 (Large Version)
 (Large Version)
This intersection is the set of feasible positions for the point $C$:


*

*It can be empty (no solution for $C$) or

*can contain one point (unique solution for $C$, see first image above), 

*two points (two solutions for $C$, see second image above) and 

*for a rare but existing configuration consisting of the points of the full circle, if both circles have same radius and center (infinite many solutions for $C$, see image below). 


 (Large Version)
I suggest to use the above link for the interactive GeoGebra worksheet and play a bit with the values to get a feeling.
