\text{Click to select}

#4D4D4D

$\text{Check}$

$\text{NEW PROBLEM}$

Reset app

\text{This is the error specific hint}

#006758

#B00020

#252525

#757575

#949494

#E44461

#DA2570

#E66B9E

#3A6ED6

#5991FF

#008475

#0F8538

#00a83c

#5145A8

#6557D2

#8575FF

#903D14

#BD6C43

#C75000

#E07415

#eeeeee

#2E006758

#2EB00020

allRandomSeeds = RandomUniform(0, 0.99, 200)
whichRay = 1
partSelected = NaN
inputSaved: {NaN}
countQuestion = 0
numRandoms: 4
randIndex: (Mod[countQuestion, floor(Length[allRandomSeeds] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1)
indexLetter: 1 + floor((currentRandomSeeds(4) * 3))
letterSet = Element({{"A", "B", "C"}, {"L", "M", "N"}, {"X", "Y", "Z"}}, indexLetter)
angleName: "\angle " + (LaTeX[Sum[letterSet]]) + ""
partNames: {"the vertex", "the exterior", "the interior", "a ray"}
caseNum: 1 + floor((currentRandomSeeds(3) * 4))
randomNum1: 3 + floor((currentRandomSeeds(1) * 15))
onboarding = true
input1 = NaN
input2: NaN
inputCurrent: {partSelected, If[Defined[whichRay], whichRay, -3]}
B = (5.000341064524864, 5.69392166828734)
randomNum2: randomNum1 + 2 + floor((currentRandomSeeds(2) * 10))
correct1: input1 ≟ randomNum1
validate = false
showanswer = false
showsolution = false
tries = 0
countCorrect = 0
showhint = false
correct2: input2 ≟ randomNum2
correct: partSelected ≟ caseNum
showbuttons = true
typicalError1: 0
typicalError2: 0
showhinttypicalerror = false
textCountCorrect: "\text{Number correct: " + (LaTeX[countCorrect]) + " }"
labelBtnValidate: "\text{CHECK (" + (LaTeX[3 - tries]) + ")}"
enableBtnValidate: inputCurrent ≠ inputSaved ∧ inputCurrent ≟ RemoveUndefined[inputCurrent] ∧ (¬onboarding)
helpTextHint: "\text{" + (LaTeX[If[Defined[inputSaved(1)], (((("You have selected " * partNames(inputSaved(1))) * " \\of ") * angleName) * " ."), "Click a part of the angle to select it."]]) + "}"
pixelsRight: 16
pixelsLeft: 16
pixelsBottom: 16
pixelsTop: 24
textHint: "\text{\color{" + (LaTeX[colorOrange]) + "}\bold{Hint}\\" + (LaTeX[If[showhinttypicalerror, helpTextHintTypicalError]]) + "" + (LaTeX[If[showhint ∧ showhinttypicalerror, "\\"]]) + "" + (LaTeX[If[showhint, helpTextHint]]) + "}"
layoutY: 75
enableInput: tries < 3 ∧ (¬(validate ∧ correct))
layoutX: 16
layoutAppSize = Corner(5)
textFeedback: "" + (LaTeX[If[correct, "$\text{✓ Correct}$", "$\text{✕ " + (If[tries < 3, "Try again", "Maybe next time"]) + "}$"]]) + ""
pulsingSpeed: 10
pulsing = 0.8 (slider from 0 to 1, step 0.1)
haloPixels: (pulsing * 7)
onboardingDisplayText: "" + (LaTeX[onboardingText]) + ""
A = (4.591072725036432, 5.892161020227049)
C = (4.917208433066277, 6.084005554362252)
pulsingObject = sectorPixels(A, B, C, haloPixels + 40, Corner[1], Corner[3], Corner[5])
displayAngle = sectorPixels(A, B, C, 40, Corner[1], Corner[3], Corner[5])
layoutOnboarding = PointToPixels(Corner[onboardingDisplayText, 2], Corner[1], Corner[3], Corner[5])
onboardingX = 370
onboardingY = 228
onboardingCase: 2
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
AnchorFigure: (0, 0)
indexRotation: 1 + floor((currentRandomSeeds(1) * 8))
indexAngle: 1 + floor((currentRandomSeeds(2) * 8))
currentAngle = Element({pi / 2, pi / 3, pi / 4, (3 * pi / 5), (2 * pi / 5), (2 * pi / 3), pi / 6, (5 * pi / 6)}, indexAngle)
rotationAngle = Element({pi / 2, pi / 3, pi / 4, (3 * pi / 5), (2 * pi / 5), (2 * pi / 3), pi / 6, (5 * pi / 6)}, indexRotation)
currentPart = Element(partNames, caseNum)
armLength: 2.5
PtA = Rotate(AnchorFigure + (armLength, 0), rotationAngle + currentAngle, AnchorFigure)
PtB = Rotate(AnchorFigure + (armLength, 0), rotationAngle, AnchorFigure)
HighlightVertex: AnchorFigure
MidA: AnchorFigure + UnitVector[Vector[AnchorFigure, PtA]]
MidB: AnchorFigure + UnitVector[Vector[AnchorFigure, PtB]]
exteriorRegion = CircleSector(AnchorFigure, MidA, MidB)
interiorRegion = CircleSector(AnchorFigure, MidB, MidA)
rayA = Segment(AnchorFigure, PtA)
rayB = Segment(AnchorFigure, PtB)
highlightRayA = Segment(AnchorFigure, PtA)
highlightRayB = Segment(AnchorFigure, PtB)
highlightExterior: exteriorRegion
highlightInterior: interiorRegion
VERTEX: 1
EXTERIOR: 2
INTERIOR: 3
RAY: 4
cover = Polygon({((-armLength) - 1, (-armLength) - 1), ((-armLength) - 1, armLength + 1), (armLength + 1, armLength + 1), (armLength + 1, (-armLength) - 1)})
isTypicalError: false
pulseCover = Polygon({((-armLength) - 1, (-armLength) - 1), ((-armLength) - 1, armLength + 1), (armLength + 1, armLength + 1), (armLength + 1, (-armLength) - 1)})
textSolution: "\text{\bold{Solution}\\" + (LaTeX[If[caseNum ≟ RAY, (("The two rays of " * angleName) * " are \\highlighted in the figure."), (((ReplaceAll[currentPart, "the", "The"] * " of ") * angleName) * " is \\highlighted in the figure.")]]) + "}"
highlightColor = If(¬showsolution, {218 / 255, 37 / 255, 112 / 255}, {0, 103 / 255, 88 / 255})
lblThird = Text(("" * letterSet(3)), AnchorFigure + (1.1 * (PtB - AnchorFigure)), true, true, 0, 0)
lblFirst = Text(("" * letterSet(1)), AnchorFigure + (1.1 * (PtA - AnchorFigure)), true, true, 0, 0)
lblVertex = Text(("" * letterSet(2)), Midpoint[PtA, PtB] + (1.2 * (AnchorFigure - Midpoint[PtA, PtB])), true, true, 0, 0)
textQuestion: "\text{Select " + (LaTeX[currentPart]) + " of " + (LaTeX[angleName]) + ".}"

Tool: PointToPixels
PointToPixels(InputPoint,Corner1,Corner3,Corner5)
Input: InputPoint, Corner1, Corner3, Corner5
Output: OutputPixels

xLeft: x(Corner1)
xRight: x(Corner3)
yTop: y(Corner3)
yBottom: y(Corner1)
yPixels: (y(Corner5) * (yTop - y(InputPoint)) / (yTop - yBottom))
xPixels: (x(Corner5) * (x(InputPoint) - xLeft) / (xRight - xLeft))
OutputPixels: (xPixels, yPixels)

Tool: sectorPixels
sectorPixels(Midpoint,B,C,pixelRadius,Corner1,Corner3,Corner5
Input: A, B, C, pixelRadius, Corner1, Corner3, Corner5
Output: newSector

pointRadius: (pixelRadius / x(Corner5) * (x(Corner3) - x(Corner1)))
BPrime: A + (pointRadius * UnitVector[B - A])
newSector = CircleSector(A, BPrime, C)

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)