As we have x and y readily available, let’s choose the arctangent formula. Here, D1 can be calculated in two ways: The arcsine of y/dist or the arctangent of y/x. In the following diagram, x, y, and dist define a right-angled triangle. This comes handy in two places, as we’ll see shortly.įrom the robotic arm diagram above (the one with D1, D2, dist, etc), we can directly derive the first formula: A1 = D1 + D2ĭ1 is fairly easy to calculate. With this version, we can calculate angle C from the triangle’s sides a, b, and c. We do not need the basic form, but rather the transformed version that you can see below the original formula. The law of cosines (see the first formula in the figure above) is a generalization of the Pythagorean theorem (c 2 = a 2 + b 2 for right(-angled) triangles) to arbitrary triangles. Now is a good moment to dig out an old trig formula you may remember from school: The law of cosines. Furthermore, dist divides angle A1 into two angles D1 and D2. It points from (0,0) to (x,y), and as you can easily see, the three lines dist, len1, and len2 define a triangle. In the diagram you also see a new dotted line named dist.
0 Comments
Leave a Reply. |