Why does the Level 2 solution for the “Drawing a Triangle With a Gyroscope” use 113 degrees for the first turn and not 120? The robot is drawing a right triangle. Why are the angles not 30-60-90? Instead they are 113-270.
For example…here is the code. Note the value of “113” for heading.
Here is the resulting right triangle that is produced. Why is that value in the code not 120 instead of 113? I’m missing something here…
Ok, so these are the requirements for the Level 2 Solution.
So there are no requirements for the triangle to be a 30-60-90 triangle in the second level. The third level requires a 30-60-90 triangle. The measurements for the solution for level 2 make a right triangle, approximately 23-67-90.
Chances are that you are confusing Levels 2 and 3.
Okay but the math for the lengths of each side is correct. The square root of (250 squared + 600 squared) = 650. So why are the angles in level 2 not 30-60-90? Or in this case, why are the gyroscope headings in this problem not 120 & 270?
Pythagorean theorem works with any right triangle, not just 30-60-90. So yes, the length of the sides should be correct.
Because those aren’t the values that correspond with these distances.
Using trigonometry for the answers:
cos^-1(600/650) = 22.619 degrees
sin^-1(600/650) = 67.380 degrees
Using trigonometry for a 30-60-90 triangle with a hypotenuse of 650, we get:
cos(30) * 650 = 562.917 mm
sin(30) * 650 = 325 mm
If you plug those second set of measurements in with the angles you want, you will get your 30-60-90 right triangle.