$\textsf{NEW ANGLE}$

$\textsf{CHECK}$

Reset

\text{Drag to create an angle}

1 = arrow left, 2 = arrow right, 3 = arrow uo, 4 = arrow down

questionCount = 0
randomAngles = Shuffle(Sequence[5, 175])
angleToMeasure = Element(randomAngles, Mod[questionCount, Length[randomAngles]] + 1)
requestedAngle: angleToMeasure°
randomFixedEndPoints = Shuffle(Sequence[pi / 15, (2 * pi) - pi / 15, pi / 15])
AnglesFixedEndPoint = Flatten({Sequence[0, ii, 1, 5], randomFixedEndPoints})
angleFixedEndPoint = Element(AnglesFixedEndPoint, Mod[questionCount, Length[AnglesFixedEndPoint]] + 1)
FixedEndPoint: (4 * (cos(angleFixedEndPoint), sin(angleFixedEndPoint)))
Cent: (0, 0)
seg1 = Segment(Cent, Dilate[FixedEndPoint, 1.1])
CircMovablePoint = Circle(Cent, 4)
MovableEndPoint = Point(CircMovablePoint)
MovablePointDyn = DynamicCoordinates(MovableEndPoint, x(MovableEndPoint), y(MovableEndPoint))
seg2 = Segment(Cent, Dilate[MovablePointDyn, 1.1])
α = Angle(seg1, seg2)
dif: abs(requestedAngle - α)
colorCase = If(dif ≤ 1°, 4, If[dif ≤ 10°, 3, If[dif ≤ 30°, 2, 1]])
C = Dilate(MovablePointDyn, 4.2 / 4)
CircHint = Circle(Cent, 4.2)
α2 = Angle(Vector[(1, 0)], Vector[MovablePointDyn])
radHint: 4.2
ProtImg2 = Rotate(ProtImg, 180°)
AppSize = Corner(5)
questionText: "\text{Create an angle with a measure of " + (LaTeX[angleToMeasure]) + "°}"
Cor1: (-8, -4.88)
Cor3: (8, 4.88)
ProtractorRadius_{1} = 3.9 (slider from 3 to 10)
ProtractorCenter_{1} = (0, 0)
ProtractorCircle_{1} = Circle(ProtractorCenter_{1}, ProtractorRadius_{1})
ProtractorRight_{1}: (ProtractorRadius_{1} * (cos(angleFixedEndPoint), sin(angleFixedEndPoint)))
ProtractorLeft_{1} = Mirror(ProtractorRight_{1}, Cent)
ProtractorDist_{1} = 0.06350442897940278 (slider from -5 to 5)
ProtractorLine_{1} = Line(ProtractorLeft_{1}, ProtractorRight_{1})
ProtractorRightDyn'_{1} = Rotate(ProtractorRight_{1}, -90°, ProtractorLeft_{1})
ProtractorPerpendicular_{1} = Ray(ProtractorLeft_{1}, ProtractorRightDyn'_{1})
ProtractorCorner1_{1} = Intersect(Circle[ProtractorLeft_{1}, (ProtractorDist_{1} * ProtractorRadius_{1})], ProtractorPerpendicular_{1})
showProt: abs(requestedAngle - α) ≤ 20°
A = Midpoint(Corner[ProtImg, 4], Corner[ProtImg, 3])
correct: abs(requestedAngle - α) ≤ 1°
text1 = If(correct, "\hspace{15}✓ Correct!\hspace{15}", "✘ Try Again")
layOutX: 16
layoutY: 448
ProtractorCorner2_{1} = Translate(ProtractorRight_{1}, Vector[ProtractorLeft_{1}, ProtractorCorner1_{1}])
B = Midpoint(Corner[ProtImg2, 4], Corner[ProtImg2, 3])
option: Distance[MovableEndPoint, A] > Distance[MovableEndPoint, B]
E = Rotate(C, (-10° * If[requestedAngle ≤ α, 1, -1]))
D = Rotate(C, (-5° * If[requestedAngle ≤ α, 1, -1]))
u = Vector(D, E)
D' = Rotate(C, (5° * If[requestedAngle ≤ α, 1, -1]))
E' = Rotate(C, (10° * If[requestedAngle ≤ α, 1, -1]))
text3: "\hspace{20}\text{Your angle is\\too " + (LaTeX[If[requestedAngle ≥ α, "small", "large"]]) + ".}\hspace{20}"
HintArc = Arc(CircHint, If[requestedAngle ≥ α, C, E], If[requestedAngle ≥ α, E, C])
HintArc' = Mirror(HintArc, Line[MovablePointDyn, Cent])
v = Vector(D', E')
text4 = Text(text3, C, true, true, If[x(C) ≥ 0, 1, -1], If[y(C) ≥ 3.5, -1, 0])
speed: 2
A_{1} = (1, 1)
onboardingPoint: MovablePointDyn + (0.5, 0)
AstartPos_{1}: (1, 1)
showonboarding = true
MovablePointDyn' = Dilate(MovablePointDyn, 1.1)
altPoint: x(MovablePointDyn) ≤ 0 ∧ y(MovablePointDyn) ≥ 3
PointFeedback = If(altPoint, Translate[(0, 0), Vector[((4 * 1.1) * (cos(130°), sin(130°)))]], MovablePointDyn')
textCold: "\textsf{" + (LaTeX[If[colorCase ≟ 1, "Cold, cold...", colorCase ≟ 2, "Getting warm!", colorCase ≟ 3, "Hot, hot...", colorCase ≟ 4, "Burning!"]]) + "}"
textColdPos = Text(textCold, PointFeedback, true, true, If[x(MovablePointDyn) > 0, 1, -1], 0)
red: {58, 101, 199, 176} / 255
green: {110, 87, 80, 0} / 255
blue: {214, 210, 0, 32} / 255
ProtOp: 1 - Min[dif / (30°), 1]
onboarding_{1} = true
onboardingX_{1}: 588
onboardingY_{1}: 290
onboardingCase_{1} = 3
OnboardingTextOffset_{1} = onboardingTextOffset(Corner[onboardingText_{2}, 1], Corner[onboardingText_{2}, 3], onboardingCase_{1}, Corner[1], Corner[3], Corner[5])
onboardingDisplayText_{1}: "\text{\vphantom{Og}" + (LaTeX[onboardingText_{2}]) + "}"
pulsingSpeed: 8
pulsing = 0.3 (slider from 0 to 1, step 0.1)
pulsingobject = circlePixels(MovablePointDyn, 7 + (7 * pulsing), Corner[1], Corner[3], Corner[5])

Tool: onboardingTextOffset
onboardingTextOffset(textCorner1,textCorner3,case,corner1,corner3,corner5)
Input: CornerText1, CornerText3, case, Corner1, Corner3, Corner5
Output: TextOffset

xPixels: ((x(CornerText3) - x(CornerText1)) * x(Corner5) / (x(Corner3) - x(Corner1)))
yPixels: ((y(CornerText3) - y(CornerText1)) * y(Corner5) / (y(Corner3) - y(Corner1)))
xOffset = Element({27, (-xPixels) + 2, 16 - xPixels / 2, 16 - xPixels / 2}, case)
yOffset = Element({-23, -23, yPixels - 27, -49}, case)
TextOffset: (xOffset, yOffset)

Tool: onboardingTextOffset (command onboardingTextOffset1)
onboardingTextOffset(textCorner1,textCorner3,case,corner1,corner3,corner5)
Input: CornerText1, CornerText3, case, Corner1, Corner3, Corner5
Output: TextOffset

xPixels: ((x(CornerText3) - x(CornerText1)) * x(Corner5) / (x(Corner3) - x(Corner1)))
yPixels: ((y(CornerText3) - y(CornerText1)) * y(Corner5) / (y(Corner3) - y(Corner1)))
xOffset = Element({27, (-xPixels) + 2, 16 - xPixels / 2, 16 - xPixels / 2}, case)
yOffset = Element({-23, -23, yPixels - 27, -49}, case)
TextOffset: (xOffset, yOffset)

Tool: circlePixels
circlePixels(A,pixelRadius,Corner1,Corner3,Corner5
Input: A, pixelRadius, Corner1, Corner3, Corner5
Output: newCircle

pointRadius: (pixelRadius / x(Corner5) * (x(Corner3) - x(Corner1)))
newCircle = Circle(A, pointRadius)