So one of my upcoming projects is going to be based off of a Strandbeest leg so I decided to to see about create some equations to fully plot how the leg moves given a set of lengths and crank rotations.
So to start off I have to define an origin. The best place i can think of to set the origin would be the base of the crank. After that I want to label each of the vertices.
So using the following diagram I am going to define the vertex between segments m and l as point
\[\begin{aligned}
O &= (O_x, O_y) \\
&= (0, 0)
\end{aligned}\].
From there I will define the end of segment m as point \[ A = (A_x, A_y) \]
I can easily define a set of equations for the the point A as
\[\begin{aligned}
A &= (A_x, A_y) \\
&= (O_x + m \cos(\theta), O_y + m \sin(\theta)) \end{aligned}\]
The next two points that are very easy to define are the fixed "knee" and "hip" points.
The "hip" point is the vertex joining segment a and segment l. Because these points are fixed relative to the origin. I am labelling this point \[\begin{aligned} B &= (B_x, B_y) \\ &= (O_x, O_y - l) \\ &=(0, -l) \end{aligned}\] You may notice that I have predefined this to be directly below the origin which is not technically correct but it is in line with the original design of the leg.
Similarly the "knee" point is the vertex between the segments a, b, c, and d. This point can be defined as \[\begin{aligned} C &= (C_x, C_y) \\ &= (B_x - a, B_y)\\ &= (-a, -l) \end{aligned}\]
The first difficult point to define I am going to label point D and it is the vertex connecting segments j, b, and e. This is a difficult point because There are more restrictions on this point. The first way to define this point is relative to segment j.
\[\begin{aligned} D &= (D_x, D_y) \end{aligned}\]
I know that the point D has to be a distance \[ \|DC\| = b \] away from point C. I also know that point D is a distance \[ \|DA\| = j\] from point A.
\[\begin{aligned} \|D - A\| &= j \\ \|(D_x, D_y) - (A_x, A_y)\| &= j \\ \|(D_x - A_x, D_y - A_y)\| &= j \\ (D_x - A_x)^2 + (D_y - A_y)^2 &= j^2 \\ D_x^2 -2D_xA_x + A_x^2 + D_y^2 -2D_yA_y + A_y^2 &= j^2 (1) \end{aligned}\]
\[\begin{aligned} \|D - C\| &= b \\ \|(D_x, D_y) - (C_x, C_y)\| &= b \\ \|(D_x - C_x, D_y - C_y)\| &= b \\ (D_x - C_x)^2 + (D_y - C_y)^2 &= b^2 \\ D_x^2 -2D_xC_x + C_x^2 + D_y^2 -2D_yC_y + C_y^2 &= b^2 (2) \end{aligned}\]
Subtracting equation (1) from equations (2) I end up with \[\begin{aligned} -2D_xC_x + 2D_xA_x + C_x^2 - A_x^2 -2D_yC_y + 2D_yA_y + C_y^2 - A_y^2 &= b^2 - j^2 \\ 2D_x(A_x - C_x) + 2D_y(A_y - C_y) + C_x^2 - A_x^2 + C_y^2 - A_y^2 &= b^2 - j^2 \end{aligned}\]
Substituting our equations for A and C we get \[\begin{aligned} 2D_x((O_x + m\cos(\theta)) - (B_x - a)) + \\ 2D_y((O_y + m\sin(\theta)) - (B_y)) + \\(B_x - a)^2 - (O_x + m\cos(\theta))^2 + \\ (B_y)^2 - (O_y + m\sin(\theta))^2 &= b^2 - j^2 \\ \end{aligned}\]
Adding in our equation for B we get \[\begin{aligned} 2D_x((O_x + m\cos(\theta)) - (O_x - a)) + \\ 2D_y((O_y + m\sin(\theta)) - (O_y - l)) + \\(O_x - a)^2 - (O_x + m\cos(\theta))^2 + \\ (O_y - l)^2 - (O_y + m\sin(\theta))^2 &= b^2 - j^2 \\ \end{aligned}\]
Finally substituting our values for O we get \[\begin{aligned} 2D_x(m\cos(\theta) + a) + \\ 2D_y(m\sin(\theta) + l) + \\ a^2 - m^2\cos^2(\theta) + \\ l^2 - m^2\sin^2(\theta) &= b^2 - j^2 \\ 2D_x(m\cos(\theta) + a) + \\ 2D_y(m\sin(\theta) + l) + \\ a^2 + l^2 - \\ m^2(\cos^2(\theta) + \sin^2(\theta)) &= b^2 - j^2\end{aligned}\]
Using the Pythagorean formula for sings and cosines \[\begin{aligned} \sin^2(\theta) + \cos^2(\theta) = 1 \end{aligned}\] we can simply the above to: \[\begin{aligned} 2D_x(m\cos(\theta) + a) + \\ 2D_y(m\sin(\theta) + l) + \\ a^2 + l^2 - m^2 &= b^2 - j^2 \\ 2D_x(m\cos(\theta) + a) + 2D_y(m\sin(\theta) + l) &= b^2 - j^2 - a^2 - l^2 + m^2 \\ D_x(m\cos(\theta) + a) + D_y(m\sin(\theta) + l) &= \frac{1}{2}(b^2 - j^2 - a^2 - l^2 + m^2) \\ D_y(m\sin(\theta) + l) &= -D_x(m\cos(\theta) + a) + \frac{1}{2}(b^2 - j^2 - a^2 - l^2 + m^2) \\ D_y &= -D_x\frac{m\cos(\theta) + a}{m\sin(\theta) + l} + \frac{b^2 - j^2 - a^2 - l^2 + m^2}{2(m\sin(\theta) + l)}\end{aligned}\]
Plugging this equation back into our original equation (1) we get \[\begin{aligned} D_x^2 -2D_xA_x + A_x^2 + D_y^2 -2D_yA_y + A_y^2 &= j^2 \\ D_x^2 -2D_xA_x + A_x^2 + \\ \left(-D_x\frac{m\cos(\theta) + a}{m\sin(\theta) + l} + \frac{b^2 - j^2 - a^2 - l^2 + m^2}{2(m\sin(\theta) + l)}\right)^2 \\ - 2\left( -D_x\frac{m\cos(\theta) + a}{m\sin(\theta) + l} + \frac{b^2 - j^2 - a^2 - l^2 + m^2}{2(m\sin(\theta) + l)}\right)A_y + A_y^2 &= j^2 \\ \end{aligned}\]
Let \[\begin{aligned}\beta &= \frac{b^2 - j^2 - a^2 - l^2 + m^2}{2(m\sin(\theta) + l)} \\ \gamma &= \frac{m\cos(\theta) + a}{m\sin(\theta) + l} \end{aligned}\]
Then \[\begin{aligned} D_x^2 -2D_xA_x + A_x^2 + \left(-D_x\gamma + \beta\right)^2 - 2\left( -D_x\gamma + \beta\right)A_y + A_y^2 &= j^2 \\ D_x^2 -2D_xA_x + A_x^2 + D_x^2\gamma^2 - 2D_x\gamma\beta + \beta^2 + 2D_xA_y\gamma - 2A_y\beta + A_y^2 &= j^2 \\ D_x^2(\gamma + 1) +D_x(-2A_x-2\gamma\beta+2A_y\gamma) + A_x^2 + \beta^2-2A_y\beta+A_y^2 -j^2 &= 0\end{aligned}\]
Using the quadratic formula we can solve for this as \[\begin{aligned} D_x &= \frac{-(2A_x - 2\gamma\beta + 2A_y\gamma) \pm \sqrt{(2A_x - 2\gamma\beta + 2A_y\gamma)^2 -4(\gamma + 1)(A_x^2 + \beta^2-2A_y\beta+A_y^2 -j^2)}}{2(\gamma + 1)}\end{aligned}\]
Substituting in the equations for A and O I can expand this out to be \[\begin{aligned} D_x &= \frac{-(2m\cos(\theta) - 2\gamma\beta + 2m\sin(\theta)\gamma) \pm \sqrt{(2m\cos(\theta) - 2\gamma\beta + 2m\sin(\theta)\gamma)^2 -4(\gamma + 1)(m^2\cos^2(\theta) + \beta^2-2m\sin(\theta)\beta+m^2\sin^2(\theta) -j^2)}}{2(\gamma + 1)}\end{aligned}\]
Taking parts individually first I have \[\begin{aligned} (2m\cos(\theta) - 2\gamma\beta + 2m\sin(\theta)\gamma)^2 &=&\left(2m(\cos(\theta) + \sin(\theta)) - 2\gamma\beta\right)^2 \\ &=&4m^2(\cos(\theta) + \sin(\theta))^2 \\ &&- 8m\gamma\beta(\cos(\theta) + \sin(\theta)) \\ &&+4\gamma^2\beta^2 \\ &=&4m^2(\cos^2(\theta) + \sin^2(\theta) + 2\cos(\theta)\sin(\theta)) \\ &&- 8m\gamma\beta(\cos(\theta) + \sin(\theta)) \\ &&+4\gamma^2\beta^2\end{aligned}\]
Using the pythagorean formula for sings and cosines as well as the double angle formulas for sine and cosine I can simplify this to be \[\begin{aligned} (2m\cos(\theta) - 2\gamma\beta + 2m\sin(\theta)\gamma)^2 &=&4m^2(1 + \sin(2\theta)) \\ &&- 8m\gamma\beta(\cos(\theta) + \sin(\theta)) \\ &&+4\gamma^2\beta^2 \\ \end{aligned}\]
Next section: \[\begin{aligned} m^2\cos^2(\theta) + \beta^2-2m\sin(\theta)\beta+m^2\sin^2(\theta) -j^2 &= m^2(\cos^2(\theta) + \sin^2(\theta))-2m\beta\sin(\theta) + \beta^2 - j^2 \\ &=m^2 -2m\beta\sin(\theta) + \beta^2 - j^2\end{aligned}\]
Going back to our equation for dx we have \[\begin{aligned} D_x &= \frac{2\gamma\beta -2m\cos(\theta) - 2m\gamma\sin(\theta) \pm \sqrt{4m^2(1 + \sin(2\theta)) - 8m\gamma\beta(\cos(\theta) + \sin(\theta)) +4\gamma^2\beta^2 -4(\gamma + 1)(m^2 -2m\beta\sin(\theta) + \beta^2 - j^2)}}{2(\gamma + 1)} \\ &= \frac{2(\gamma\beta -m\cos(\theta) - m\gamma\sin(\theta)) \pm \sqrt{4(m^2(1 + \sin(2\theta)) - 2m\gamma\beta(\cos(\theta) + \sin(\theta)) +\gamma^2\beta^2 -(\gamma + 1)(m^2 -2m\beta\sin(\theta) + \beta^2 - j^2)}}{2(\gamma + 1)} \\ &= \frac{\gamma\beta -m\cos(\theta) - m\gamma\sin(\theta) \pm \sqrt{m^2(1 + \sin(2\theta) - 2m\gamma\beta(\cos(\theta) + \sin(\theta) +\gamma^2\beta^2 - (\gamma + 1)(m^2 -2m\beta\sin(\theta) + \beta^2 - j^2)}}{\gamma + 1}\end{aligned}\]
This will give me 2 points that correspond to the 2 intersection points between a circle of radius b centered at point C and a circle of radius j centered at point A. One will be for the vertex described. The second one would appear somewhere below the point C. At this point I don't have a good idea of which point I will need.