# Khan/khan-exercises

Switch branches/tags
Nothing to show
Fetching contributors…
Cannot retrieve contributors at this time
137 lines (118 sloc) 6.32 KB
 Unit circle
true randRangeNonZero(-90, 90) * 5 ANGLE * PI / 180 ANGLE + "^{\\circ}" randFromArray( [ "cos", "sin" ] ) { "cos": i18n._("cosine"), "sin": i18n._("sine")}[FN] { "cos": "x", "sin": "y"}[FN] roundTo(3, { "cos": Math.cos(ANGLE * (Math.PI/180)), "sin": Math.sin(ANGLE * (Math.PI/180)) }[FN])

\FN\left(PRETTY_ANGLE\right) = \text{?}

Move the orange point around the unit circle to the angle PRETTY_ANGLE radians to find the FNNAME value.
Round to the nearest thousandth.

initUnitCircle(DEGREES);
SOLUTION
angle
if (abs(guess) < 0.001) { return "Move the orange point around the unit circle to the correct position."; } // Verify that the angles match if (abs(guess - ANGLE_RADIANS) < 0.001) { return true; } // Convert guess to an angle between 0 and 2 * PI for comparison var revolutions = floor(guess / (2 * PI)); var modified_guess = guess - revolutions * 2 * PI; // Convert answer to an angle between 0 and 2 * PI revolutions = floor(ANGLE_RADIANS / (2 * PI)); var modified_angle = ANGLE_RADIANS - revolutions * 2 * PI; if (abs(modified_angle - modified_guess) < 0.001) { return "The orange point is in the correct position, but must measure the correct angle."; } else { return false; }
KhanUtil.setAngle( guess );

To find the FNNAME using the unit circle, first find the angle. Drag the orange point around the circle until PRETTY_ANGLE is selected.

The correct angle is selected. Remember, the FNNAME of an angle is represented by the COORD coordinate of its corresponding point on the unit circle.

goToAngle( ANGLE );

The COORD coordinate of the point is \pink{SOLUTION}, so \FN\left(PRETTY_ANGLE\right) = SOLUTION.

goToAngle(ANGLE); showCoordinates(ANGLE, COORD);
false randFromArray([ -6*PI/2, -5*PI/2, -7*PI/3, -9*PI/4, -2*PI, -11*PI/6, -7*PI/4, -5*PI/3, -3*PI/2, -4*PI/3, -5*PI/4, -7*PI/6, -PI, -5*PI/6, -3*PI/4, -2*PI/3, -PI/2, -PI/3, -PI/4, -PI/6, -PI/12, PI/12, PI/6, PI/4, PI/3, PI/2, 2*PI/3, 3*PI/4, 5*PI/6, PI, 7*PI/6, 5*PI/4, 4*PI/3, 3*PI/2, 5*PI/3, 7*PI/4, 11*PI/6, 2*PI, 9*PI/4, 7*PI/3, 5*PI/2, 6*PI/2 ]) ANGLE piFraction(ANGLE, false, 0.001, true) randFromArray( [ "cos", "sin" ] ) { "cos": i18n._("cosine"), "sin": i18n._("sine")}[FN] { "cos": "x", "sin": "y"}[FN] roundTo(3, { "cos": Math.cos(ANGLE), "sin": Math.sin(ANGLE) }[FN])