(Update: Jun 11, 2020 - Eliminated a divide-by-zero bug thanks to @kriblo. Full description and earlier updates listed at the bottom.) I made this to help myself understand trigonometry. If this is confusing, read a bit about sine, cosine and tangent first, and then come back and experiment. :) ▪️◾️◼️ Controls ◼️◾️▪️ Click "degrees" box to switch between Mathematic degrees and Scratch degrees. Click the green flag to play an animation, constantly adding one degree. Click the step-buttons to step forward or backwards one degree. You can also click and drag the red dot to move it (using arctangent!). ▪️◾️◼️ Notes ◼️◾️▪️ The triangle visualization often used to explain sine cosine and tangent breaks at angle 90, after which the angle is fully or partly *outside* the triangle (see chart below). This was surprising to me at first, but makes sense considering that the sum of the internal angles of a triangle must be 180°. 0-90° Angle = inner angle 90-180° Angle = 180 minus inner angle 180-270° Angle = 180 plus inner angle 270-360° Angle = 360 minus inner angle It is starting to make sense now, if I haven't come to the wrong conclusions, which is entirely possible. At 90-180°, the adjacent, the opposite and the angle mirrors 0-90°, although both the adjacent and angle is a negative version. At 180-360°, the adjacent, the opposite and the angle mirrors 0-180°, although the opposite and the angle is a negative version. In short, when either the adjacent or the opposite, but not both, are negative, the relationship between the inner angle and the outer angle minus 180° is reversed, and when the opposite is negative, we add 180°. ▪️◾️◼️ Updates ◼️◾️▪️ Jun 11, 2020 - Eliminated a divide-by-zero bug thanks to @kriblo. It caused a glitch when dragging the red dot to y position 0. Jun 10, 2020 - It started making sense to me, so I updated the text with my discoveries. I hope I'm not mistaken... :) Jun 10, 2020 - Fixed a bug: The mathematic degree range was 1-360 instead of the intended 0-359. Thanks to @gregatku for instantly spotting it! Jun 9, 2020 - Added mathematic degrees and the ability to switch between that and Scratch degrees.
Thanks @kriblo for lots of feedback and help, and spotting the divide-by-zero bug! Thanks to @gregatku for giving me the idea to add mathematic degrees, and spotting the 1-360 degree bug.