$\text{NEW PROBLEM}$

No selection allowed for all input boxes

Fix position and allow selection for all text objects

Empty all input boxes

#006758

#B00020

#252525

#4D4D4D

#757575

#949494

#E44461

#DA2570

#E66B9E

#3A6ED6

#5991FF

#008475

#0F8538

#00a83c

#5145A8

#6557D2

#8575FF

#903D14

#BD6C43

#C75000

#E07415

$\textsf{Select the scenario:}$

$\textsf{Let's roll}$

$\textsf{\textbf{%v}}$

$\textsf{NEW STATEMENT}$

resetJar

$\textsf{Number of sectors}$

spinAngle = 6.108 (slider from 0 to (2 * pi), step 0.001)
CenterSpinner = (4.0230903762752295, 6.604949263883178)
StopSpinner = Point(x = x(CenterSpinner))
fixedSpin = Polygon({StopSpinner + (0, 1), StopSpinner + (-0.3, -0.2), StopSpinner + (0.3, -0.2)})
rollOptionsTexts: {"a one", "a two", "a three", "a four", "a five", "a six", "an even number", "an odd number"}
countQuestion = 1
randomList2 = Shuffle(Sequence[15])
randomList1 = Shuffle(Sequence[20])
randomNum2 = Element(randomList2, Mod[countQuestion, 15] + 1)
input2: 7
randomNum1 = Element(randomList1, Mod[countQuestion, 20] + 1)
input1: 6
xPixelsRight: 16
xPixelsLeft: 16
yPixelsTop: 24
yPixelsBottom: 16
borderBox = Polygon(Zip[PixelsToPoint[Corner[1], Corner[3], Corner[5], A], A, {(xPixelsLeft, yPixelsBottom), (xPixelsLeft, y(Corner[5]) - yPixelsTop), Corner[5] - (xPixelsRight, yPixelsTop), (x(Corner[5]) - xPixelsRight, yPixelsBottom)}])
scenarioList: {"$\textsf{Rolling a Die\ }$", "$\textsf{Spinning a Spinner\ }$", "$\textsf{Picking a marble out of a jar\ }$"}
scenario: 2
rollOptionsList = Zip((("$\textsf{" * A) * "  }$"), A, rollOptionsTexts)
AppSize = Corner(5)
numSectors = 3 (slider from 3 to 8, step 1)
angle: (2 * pi / numSectors)
sectorsTypes: {4, 1, 3}
sectors1 = Zip(If[k ≟ 1, CircleSector[CenterSpinner, Rotate[StopSpinner, (n * angle), CenterSpinner], Rotate[StopSpinner, ((n + 1) * angle), CenterSpinner]], NaN], k, sectorsTypes, n, Sequence[numSectors])
sectors2 = Zip(If[k ≟ 2, CircleSector[CenterSpinner, Rotate[StopSpinner, (n * angle), CenterSpinner], Rotate[StopSpinner, ((n + 1) * angle), CenterSpinner]], NaN], k, sectorsTypes, n, Sequence[numSectors])
sectors3 = Zip(If[k ≟ 3, CircleSector[CenterSpinner, Rotate[StopSpinner, (n * angle), CenterSpinner], Rotate[StopSpinner, ((n + 1) * angle), CenterSpinner]], NaN], k, sectorsTypes, n, Sequence[numSectors])
sectors4 = Zip(If[k ≟ 4, CircleSector[CenterSpinner, Rotate[StopSpinner, (n * angle), CenterSpinner], Rotate[StopSpinner, ((n + 1) * angle), CenterSpinner]], NaN], k, sectorsTypes, n, Sequence[numSectors])
sectorsBorders = Zip(CircleSector[CenterSpinner, Rotate[StopSpinner, (n * angle), CenterSpinner], Rotate[StopSpinner, ((n + 1) * angle), CenterSpinner]], n, Sequence[numSectors])
BaseImgC1 = Rotate((0.1 * CenterSpinner) + (0.9 * StopSpinner), angle / 2 - 12°, CenterSpinner)
BaseImgC2 = Rotate((0.1 * CenterSpinner) + (0.9 * StopSpinner), angle / 2 + 12°, CenterSpinner)
imgNames: {"heart", "flower", "clover", "star"}
statement2case = 3
ratio2: "" + (CountIf[x ≟ statement2case, sectorsTypes]) + ":" + numSectors + ""
fraction2: "\frac{" + (LaTeX[CountIf[x ≟ statement2case, sectorsTypes]]) + "}{" + (LaTeX[numSectors]) + "}"
fraction2reduced = If(GCD[numSectors, CountIf[x ≟ statement2case, sectorsTypes]] > 1, " or \textbf{\[" + (FractionText[CountIf[x ≟ statement2case, sectorsTypes] / numSectors]) + "\]}", "")
A = (0.39057202089228776, -1.7375293319539025)
B = (1.7142863368369188, -1.7990974396722574)
C = (4.392499022585358, -1.7375293319539025)
D = (3.130352814359082, -1.6143931165171927)
E = (5.654645230811635, -1.4912569010804828)
F = (4.731123615036311, -0.629303393023514)
G = (2.329967414020468, -0.7216555546010464)
H = (1.129389313512547, -0.7524396084602238)
I = (-0.07118878699537425, -0.5061671775868041)
J = (3.561329568387567, -0.41381501600927173)
K = (5.870133607825877, -0.07519042355831967)
L = (0.8523328287799498, 0.4481384920476972)
M = (2.637807952612243, 0.4173544381885197)
N = (-0.040404733136196774, 1.2793079462454886)
O = (4.423283076444536, 0.5404906536252295)
P = (5.59307712309328, 1.094603623090424)
Q = (1.8066384984144512, 1.4024441616821985)
R = (3.561329568387567, 1.4332282155413758)
S = (4.731123615036311, 1.98734118500657)
T = (0.8831168826391272, 2.2643976697391675)
U = (2.730160114189775, 2.2951817235983447)
V = (-0.13275689471372917, 3.003214962359426)
W = (5.777781446248345, 2.8185106392043617)
Z = (4, 3)
A_1 = (1.8066384984144512, 3.187919285514491)
B_1 = (4.977396045909731, 3.8651684704163953)
C_1 = (2.976432545063195, 3.8036003626980404)
D_1 = (0.60606039790653, 4.111440901289815)
E_1 = (2.052910929287871, 4.727121978473364)
F_1 = (3.807601999260987, 4.850258193910074)
speed: 2
textBtnNew: (("$\textsf\bold{" * If[scenario ≟ 3, "NEW JAR", "NEW SPINNER"]) * "}$")
sectorsPic1 = Zip(If[k ≟ 1, Rotate[pic1, (n * angle), CenterSpinner], NaN], k, sectorsTypes, n, Sequence[numSectors])
sectorsPic2 = Zip(If[k ≟ 2, Rotate[pic2, (n * angle), CenterSpinner], NaN], k, sectorsTypes, n, Sequence[numSectors])
sectorsPic4 = Zip(If[k ≟ 4, Rotate[pic4, (n * angle), CenterSpinner], NaN], k, sectorsTypes, n, Sequence[numSectors])
sectorsPic3 = Zip(If[k ≟ 3, Rotate[pic3, (n * angle), CenterSpinner], NaN], k, sectorsTypes, n, Sequence[numSectors])
textTitle: "" + (LaTeX[Element[scenarioList, scenario]]) + ""
spin = Rotate(fixedSpin, spinAngle, CenterSpinner)
statement2: "\textsf{The probability of landing \\
on a \textbf{" + (LaTeX[imgNames(statement2case)]) + "} is \textbf{" + (LaTeX[ratio2]) + "} or \textbf{" + (LaTeX[fraction2]) + "}" + (LaTeX[fraction2reduced]) + ".}"
ImgC1 = (11.04185465616769, 5.496723324952788)
ImgC2 = Point(y = y(ImgC1))

Tool: PixelsToPoint
PixelsToPoint(Corner1,Corner3,Corner5,InputPixels)
Input: Corner1, Corner3, Corner5, InputPoint
Output: OutputPoint

Corner1: (-5, -5)
Corner3: (16, 6)
Corner5: (300, 200)
xLeft: x(Corner1)
xRight: x(Corner3)
xCoord: (x(InputPoint) / x(Corner5) * (xRight - xLeft)) + xLeft
yTop: y(Corner3)
yBottom: y(Corner1)
yCoord: (y(InputPoint) / y(Corner5) * (yTop - yBottom)) + yBottom
OutputPoint: (xCoord, yCoord)

Tool: PointToPixels
PointToPixels(corner1,corner3,corner5,inputPoint)
Input: Corner1, Corner3, Corner5, InputPoint
Output: OutputPixels

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

Tool: PixelsToPoint (command PixelsToPoint1)
PixelsToPoint(Corner1,Corner3,Corner5,InputPixels)
Input: Corner1, Corner3, Corner5, InputPoint
Output: OutputPoint

Corner1: (-5, -5)
Corner3: (16, 6)
Corner5: (300, 200)
xLeft: x(Corner1)
xRight: x(Corner3)
xCoord: (x(InputPoint) / x(Corner5) * (xRight - xLeft)) + xLeft
yTop: y(Corner3)
yBottom: y(Corner1)
yCoord: (y(InputPoint) / y(Corner5) * (yTop - yBottom)) + yBottom
OutputPoint: (xCoord, yCoord)