Skip to content

Commit

Permalink
reword to make clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
DeDiamondPro committed Sep 27, 2023
1 parent c61bc7d commit d7a3be6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion documentation/src/ch04-01-inverse-kinematics-legs.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $$A = \arctan\left( \frac{x}{y} \right)$$
The following calculation calculates the angle of the sideways joint for a given y-position \\(y\\) and a given z-position \\(z\\):
$$C = \arctan\left( \frac{z}{y} \right)$$
## Final calculations
To combine the calculations, we must adjust the y variable in the y-position calculations by diving it with the cosine of the x-position and z-position calculation (\\(\frac{y}{\cos(\arctan(x/y))\cos(\arctan(z/y))}\\)). Then since \\(\cos(\arctan(x))\\) simplifies to \\(\frac{1}{\sqrt{1+x^2}}\\) we can simplify our calculation to \\(y\sqrt{1+(x/y)^2}\sqrt{1+(z/y)^2}\\). This can then further be simplified to \\(\frac{\sqrt{(y^2+x^2)(y^2+z^2)}}{y}\\)
To combine the calculations, we must adjust the y variable in the y-position calculations by dividing it with the cosine of the x- and z-position calculations like this \\(\dfrac{y}{\cos(\arctan(\frac{x}{y}))\cos(\arctan(\frac{z}{y}))}\\). Then since \\(\cos(\arctan(x))\\) simplifies to \\(\dfrac{1}{\sqrt{1+x^2}}\\) we can simplify our calculation to \\(y\sqrt{1+\left(\frac{x}{y}\right)^2}\sqrt{1+\left(\frac{z}{y}\right)^2}\\). This can then further be simplified to \\(\dfrac{\sqrt{(y^2+x^2)(y^2+z^2)}}{y}\\).

After filling that into the calculations and simplifying a bit further the following calculations are reached:
$$A = \arccos\left( \dfrac{(y^2+x^2)(y^2+z^2) + y^2l_{1}^2 - y^2l_{2}^2}{2yl_{1}\sqrt{(y^2+x^2)(y^2+z^2)}} \right) + \arctan\left( \frac{x}{y} \right)$$
Expand Down

0 comments on commit d7a3be6

Please sign in to comment.