March 22nd, 2017, 03:57 PM  #1 
Newbie Joined: Mar 2017 From: Chicago, IL Posts: 3 Thanks: 0  3 legged stool
I have a mechanism that resembles a 3 legged stool. One of the legs has a fixed length. The other 2 can change length. I need to calculate d and e that will produce a desired pitch and roll angle. When (d) and (e) are 0, all 3 legs are the same length (c) and the pitch and roll angles are 0. The pitch and roll angles are limited to +/ 45 deg.

March 23rd, 2017, 12:18 PM  #2 
Senior Member Joined: Sep 2015 From: CA Posts: 1,265 Thanks: 650 
ok, i'll give you an outline on how to do this set up your coordinate system. I chose the front point of the triangle to be $(0,0,0)$. The default rear points of the triangle are at $pleft=\left(\dfrac b 2,\dfrac 1 2\sqrt{4a^2b^2},0\right)$ $pright=\left(\dfrac b 2,\dfrac 1 2\sqrt{4a^2b^2},0\right)$ Now you can tweak these positions by $d$ on the left and $e$ on the right so after tweaking these become $pleft=\left(\dfrac b 2,\dfrac 1 2\sqrt{4a^2b^2},d\right)$ $pright=\left(\dfrac b 2,\dfrac 1 2\sqrt{4a^2b^2},e\right)$ Now form the vector from each of these points to the front point. How fortunate the front point is $(0,0,0)$ so we can use use these positions as the vectors. Find $\hat{n}=\vec{pleft} \times \vec{pright}$ This is the (unnormalized) normal vector. let $\hat{n} = (n_x, n_y, n_z)$ To find the roll find the angle between the z axis and $(n_x, 0, n_z)$ To find the pitch find the angle between the z axis and $(0, n_y, n_z)$ 
March 24th, 2017, 06:12 PM  #3 
Newbie Joined: Mar 2017 From: Chicago, IL Posts: 3 Thanks: 0 
Looks like an elegant solution. I'm rusty on vector math, can you explain... To find the roll find the angle between the z axis and (nx,0,nz) ...further? Thanks. 
March 24th, 2017, 06:30 PM  #4  
Senior Member Joined: Sep 2015 From: CA Posts: 1,265 Thanks: 650  Quote:
the angle between 2 vectors is $roll = \arccos\left(\dfrac{\vec{v}\cdot \vec{w}}{\v\\w\}\right)$ so letting $\vec{v}=(nx, 0, nz),~w=(0,0,1)$ we have $v \cdot w = nz$ $\ v \ = \sqrt{n_x^2 + n_z^2}$ $\w\=1$ so $roll = \arccos\left(\dfrac{n_z}{\sqrt{n_x^2 + n_z^2}}\right)$ Depending on the way you are measuring roll this may end up being $\arcsin$ instead of $\arccos$ it should be apparent when you start playing with it.  