#4D4D4D

$\text{Check}$

$\text{NEW PROBLEM}$

Fix position and allow selection for all text objects

Empty all input boxes

\text{\bold{Possible Solution}\
Compare the possible solution to your solution.}

$b=$

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

\text{Drag to start}

$a=\vphantom{b}$

\text{Describe the applet here}

$\text{Some string input}$

$\scalebox{2.6}\mathsf{+x}$

$\scalebox{2.6}\mathsf{-x}$

$\scalebox{2.6}\mathsf{+1}$

$\scalebox{2.6}\mathsf{+1}$

$\scalebox{2.6}\mathsf{-1}$

$\scalebox{2.6}\mathsf{-1}$

#5145A8

#DA2570

$\scalebox{2.6}\mathsf{+1}$

$\scalebox{2.6}\mathsf{-1}$

$\scalebox{2.6}\mathsf{+x}$

$\scalebox{2.6}\mathsf{-x}$

$\scalebox{2.6}\mathsf{+1}$

$\scalebox{2.6}\mathsf{-1}$

\text{Use the buttons to create expressions}

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

\textsf{Your model corresponds to an equivalent expression.}

Restart

countCorrect = 0
allRandomSeeds = RandomUniform(0, 0.99, 200)
countQuestion = 0
numRandoms = 3
randIndex: (Mod[countQuestion, floor(Length[allRandomSeeds] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1)
randomNum3 = If(-12 + floor((currentRandomSeeds(1) * 24)) ∈ {0, 1}, 2, -12 + floor((currentRandomSeeds(1) * 24)))
rows: randomNum3
solTiles2 = Sequence(If[rows ≤ 0, -1, 1], ii, 1, abs(rows))
randomNum1: -5 + floor((currentRandomSeeds(1) * 11)) + If[-5 + floor((currentRandomSeeds(1) * 11)) ≟ 0, 1, 0]
randomNum2 = If((randomNum1 * randomNum3) ≟ -1, 3, -7 + floor((currentRandomSeeds(2) * 14)))
solTiles1 = Join({Sequence[If[randomNum1 ≤ 0, -10, 10], ii, 1, abs(randomNum1)], Sequence[If[randomNum2 ≤ 0, -1, 1], ii, 1, abs(randomNum2)]})
tiles1_{1}: {}
tiles2_{1}: {}
yourSolution = true
bb_{1}: CountIf[x ≟ 1, tiles1_{1}] - CountIf[x ≟ -1, tiles1_{1}]
aa_{1}: CountIf[x ≟ 10, tiles1_{1}] - CountIf[x ≟ -10, tiles1_{1}]
factor1_{1} = Simplify((aa_{1} * x) + bb_{1})
cc_{1}: CountIf[x ≟ 10, tiles2_{1}] - CountIf[x ≟ -10, tiles2_{1}]
dd_{1}: CountIf[x ≟ 1, tiles2_{1}] - CountIf[x ≟ -1, tiles2_{1}]
factor2_{1} = Simplify((cc_{1} * x) + dd_{1})
g(x) = (factor2_{1}(x) * factor1_{1}(x))
coeffb: (randomNum2 * randomNum3)
coeffa: (randomNum1 * randomNum3)
f(x) = (randomNum3 * Polynomial[(randomNum1 * x) + randomNum2])
inputSaved: {{}, {}}
inputDefined: Sum[Zip[A ≠ "?" ∧ ReplaceAll[A, " ", ""] ≠ "", A, {stringA, stringB, stringC}]] ≟ 3
validA = true
validB = true
validC = true
inputValid: Sum[{validA, validB, validC}] ≟ 3
inputA = NaN
inputB = NaN
onboarding = false
validate = false
showanswer = false
showsolution = false
tries = 0
showhint = false
InputBoxB = Textfield(inputB)
correct2: f(0) ≟ g(0) ∧ yourSolution
correct1: Slope[f] ≟ Slope[g] ∧ yourSolution
correct: Sort[solTiles1] ≟ Sort[tiles1_{1}] ∧ Sort[solTiles2] ≟ Sort[tiles2_{1}] ∧ yourSolution
isTypicalError: inputB ≟ inputA + 1
showbuttons = true
showhinttypicalerror = false
textCountCorrect: "\text{Number correct: " + (LaTeX[countCorrect]) + " }"
helpTextHint: "\textsf{Your model represents the expression }" + (LaTeX[g]) + "."
pixelsRight: 16
pixelsLeft: 16
pixelsBottom: 16
pixelsTop: 24
borderBox = Polygon(Zip[PixelsToPoint[Corner[1], Corner[3], Corner[5], A], A, {(pixelsLeft, pixelsTop), (pixelsLeft, y(Corner[5]) - pixelsBottom), Corner[5] - (pixelsRight, pixelsBottom), (x(Corner[5]) - pixelsRight, pixelsTop)}])
textHint: "\textsf{\color{" + (LaTeX[colorOrange]) + "}\bold{Hint}}\\" + (LaTeX[If[showhinttypicalerror, helpTextHintTypicalError]]) + "" + (LaTeX[If[showhint ∧ showhinttypicalerror, "\\"]]) + "" + (LaTeX[If[showhint, helpTextHint]]) + ""
layoutY: 448
layoutX: 194
layoutAppSize = Corner(5)
inputCurrent = If(yourSolution, {tiles1_{1}, tiles2_{1}}, inputSaved)
pulsingSpeed: 8
pulsing = 0.6 (slider from 0 to 1, step 0.1)
onboardingCase: 1
onboardingX: 337
onboardingY: 150
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
onboardingDisplayText: "" + (LaTeX[onboardingText]) + ""
solutionView: showanswer ∨ showsolution
InputBoxA = Textfield(inputA)
altFeedback: "\text{" + (LaTeX[If[correct, (("Your answer is correct. Total number correct: " * countCorrect) * ". "), ("Your answer is not correct. " * If[tries < 3, "Try again. ", "Maybe next time. "])]]) + "}" + (LaTeX[If[showsolution, ("\\" * textSolution), If[showhint ∨ showhinttypicalerror, textHint, ""]]]) + ""
InputBoxC = Textfield(inputC)
textQuestion: "\text{Create a model for the algebraic expression }" + (LaTeX[If[randomNum3 ≟ 1, Polynomial[(randomNum1 * x) + randomNum2], f]]) + "."
textFeedback: "\text{\vphantom{✕}" + (LaTeX[If[correct, (("\textcolor{" * colorTealSuccess) * "}{✓ Correct}"), (((("\textcolor{" * colorRedError) * "}{✕ ") * If[tries < 3, "Try again", "Maybe next time"]) * "}")]]) + "}"
showWarning: correct1 ∧ correct2 ∧ (¬correct)
enableBtnValidate: inputCurrent ≠ inputSaved ∧ (¬showWarning)
maxTries: 3
labelBtnValidate: "\text{CHECK (" + (LaTeX[maxTries - tries]) + ")}"
enableInput: tries < maxTries ∧ (¬(validate ∧ correct))
pulsing_{1} = 0.4 (slider from 0 to 1, step 0.1)
B_{1}: (x(Corner[1]) + (16 / 800 * x(Corner[2] - x(Corner[1]))), y(Corner[4]) - ((118 + 36) / 500 * y(Corner[4] - Corner[1])))
B4_{1}: (x(Corner[1] + (116 * x(Corner[2] - Corner[1]) / 800)), y(Corner[4] - (24 / 500 * y(Corner[4] - Corner[1]))))
B1_{1}: B4_{1} - (0, (36 / 500 * y(Corner[4] - Corner[1])))
B2_{1}: B1_{1} + ((44 / 800 * x(Corner[2] - Corner[1])), 0)
B3_{1}: (x(B2_{1}), y(B4_{1}))
pulsingObject_{1} = expandQuad(B1_{1}, B2_{1}, B3_{1}, B4_{1}, (7 * pulsing_{1}), Corner[1], Corner[3], Corner[5])
scale_{1}: 0.5
stepTiles1_{1} = Zip((If[abs(A) ≟ 10, 4, 1] * scale_{1}), A, tiles1_{1})
positionTiles1_{1}: Append[0, Sequence[Sum[stepTiles1_{1}, CLIPBOARDmagicSTRINGn], CLIPBOARDmagicSTRINGn, 1, Length[tiles1_{1}]]] - 0.7
stepTiles2_{1}: (-Zip[(If[abs(CLIPBOARDmagicSTRINGA) ≟ 10, 4, 1] * scale_{1}), CLIPBOARDmagicSTRINGA, tiles2_{1}])
positionTiles2_{1} = Append(0, Sequence[Sum[stepTiles2_{1}, CLIPBOARDmagicSTRINGn], CLIPBOARDmagicSTRINGn, 1, Length[tiles2_{1}]])
viewDiagram_{1} = true
Pos_{1}: ((-scale_{1}), Element[Last[positionTiles2_{1}], 1])
AppSize_{1} = Corner(5)
unitTiles3Neg_{1} = Zip(Zip[If[(Element[tiles1_{1}, CLIPBOARDmagicSTRINGA] * Element[tiles2_{1}, B]) ≟ -1, (Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGA], Element[positionTiles2_{1}, B]), NaN], CLIPBOARDmagicSTRINGA, Sequence[Length[tiles1_{1}]]], B, Sequence[Length[tiles2_{1}]])
xTiles3HorNeg_{1} = RemoveUndefined(Zip[Zip[If[abs(Element[tiles1_{1}, CLIPBOARDmagicSTRINGA]) ≟ 10 ∧ (Element[tiles1_{1}, CLIPBOARDmagicSTRINGA] * Element[tiles2_{1}, CLIPBOARDmagicSTRINGB]) ≟ -10, Segment[(Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGA], Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGB]), (Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGA], Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGB]) + ((3 * scale_{1}), 0)], NaN], CLIPBOARDmagicSTRINGA, Sequence[Length[tiles1_{1}]]], CLIPBOARDmagicSTRINGB, Sequence[Length[tiles2_{1}]]])
xTiles3VertNeg_{1} = RemoveUndefined(Zip[Zip[If[abs(Element[tiles1_{1}, CLIPBOARDmagicSTRINGA]) ≟ 1 ∧ (Element[tiles1_{1}, CLIPBOARDmagicSTRINGA] * Element[tiles2_{1}, CLIPBOARDmagicSTRINGB]) ≟ -10, Segment[(Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGA], Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGB]), (Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGA], Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGB]) + (0, (-3 * scale_{1}))], NaN], CLIPBOARDmagicSTRINGA, Sequence[Length[tiles1_{1}]]], CLIPBOARDmagicSTRINGB, Sequence[Length[tiles2_{1}]]])
xTiles3Hor_{1} = RemoveUndefined(Zip[Zip[If[abs(Element[tiles1_{1}, CLIPBOARDmagicSTRINGA]) ≟ 10 ∧ (Element[tiles1_{1}, CLIPBOARDmagicSTRINGA] * Element[tiles2_{1}, CLIPBOARDmagicSTRINGB]) ≟ 10, Segment[(Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGA], Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGB]), (Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGA], Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGB]) + ((3 * scale_{1}), 0)], NaN], CLIPBOARDmagicSTRINGA, Sequence[Length[tiles1_{1}]]], CLIPBOARDmagicSTRINGB, Sequence[Length[tiles2_{1}]]])
unitTiles1_{1} = RemoveUndefined(Sequence[If[Element[tiles1_{1}, CLIPBOARDmagicSTRINGn] ≟ 1, (0, (2 * scale_{1})) + (Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGn], 0), NaN], CLIPBOARDmagicSTRINGn, 1, Length[tiles1_{1}]])
unitTiles2_{1} = RemoveUndefined(Sequence[If[Element[tiles2_{1}, CLIPBOARDmagicSTRINGn] ≟ 1, ((-2 * scale_{1}) - 0.65, 0) + (0, Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGn]), NaN], CLIPBOARDmagicSTRINGn, 1, Length[tiles2_{1}]])
xTiles1_{1} = RemoveUndefined(Sequence[If[Element[tiles1_{1}, CLIPBOARDmagicSTRINGn] ≟ 10, Segment[(0, (2 * scale_{1})) + (Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGn], 0), (0, (2 * scale_{1})) + (Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGn] + (3 * scale_{1}), 0)], NaN], CLIPBOARDmagicSTRINGn, 1, Length[tiles1_{1}]])
xTiles2_{1} = RemoveUndefined(Sequence[If[Element[tiles2_{1}, CLIPBOARDmagicSTRINGn] ≟ 10, Segment[((-2 * scale_{1}), 0) + (0, Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGn]), ((-2 * scale_{1}), 0) + (0, Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGn] - (3 * scale_{1}))], NaN], CLIPBOARDmagicSTRINGn, 1, Length[tiles2_{1}]])
xTiles1Neg_{1} = RemoveUndefined(Sequence[If[Element[tiles1_{1}, CLIPBOARDmagicSTRINGn] ≟ -10, Segment[(0, (2 * scale_{1})) + (Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGn], 0), (0, (2 * scale_{1})) + (Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGn] + (3 * scale_{1}), 0)], NaN], CLIPBOARDmagicSTRINGn, 1, Length[tiles1_{1}]])
xTiles2Neg_{1} = RemoveUndefined(Sequence[If[Element[tiles2_{1}, CLIPBOARDmagicSTRINGn] ≟ -10, Segment[((-2 * scale_{1}), 0) + (0, Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGn]), ((-2 * scale_{1}), 0) + (0, Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGn] - (3 * scale_{1}))], NaN], CLIPBOARDmagicSTRINGn, 1, Length[tiles2_{1}]])
unitTiles2Neg_{1} = RemoveUndefined(Sequence[If[Element[tiles2_{1}, CLIPBOARDmagicSTRINGn] ≟ -1, ((-2 * scale_{1}) - 0.65, 0) + (0, Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGn]), NaN], CLIPBOARDmagicSTRINGn, 1, Length[tiles2_{1}]])
unitTiles1Neg_{1} = RemoveUndefined(Sequence[If[Element[tiles1_{1}, CLIPBOARDmagicSTRINGn] ≟ -1, (0, (2 * scale_{1})) + (Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGn], 0), NaN], CLIPBOARDmagicSTRINGn, 1, Length[tiles1_{1}]])
a_{1} = 2 (slider from -5 to 5, step 1)
b_{1} = 3 (slider from -5 to 5, step 1)
c_{1} = 1 (slider from -5 to 5, step 1)
d_{1} = 4 (slider from -5 to 5, step 1)
MoveGL_{1} = (-3.0905656565657695, -4.300565656565796)
hGL_{1}: y = y(MoveGL_{1})
vGL_{1}: x = x(MoveGL_{1})
vGL'_{1} = Translate(vGL_{1}, Vector[(Vector[Corner[1], Corner[2]] / 800 * 16)])
Cor1_{1} = (-3.6929374999999993, -9.937659999999997)
Cor3_{1} = (18.412187499999995, 3.9476599999999995)
maxH_{1}: Length[unitTiles1_{1}] + Length[unitTiles1Neg_{1}] + (4 * Length[xTiles1_{1}]) + (4 * Length[xTiles1Neg_{1}])
maxV_{1}: Length[unitTiles2_{1}] + Length[unitTiles2Neg_{1}]
unitTiles3_{1} = RemoveUndefined(Zip[Zip[If[(Element[tiles1_{1}, CLIPBOARDmagicSTRINGA] * Element[tiles2_{1}, CLIPBOARDmagicSTRINGB]) ≟ 1, (Element[positionTiles1_{1}, CLIPBOARDmagicSTRINGA], Element[positionTiles2_{1}, CLIPBOARDmagicSTRINGB]), NaN], CLIPBOARDmagicSTRINGA, Sequence[Length[tiles1_{1}]]], CLIPBOARDmagicSTRINGB, Sequence[Length[tiles2_{1}]]])
consTerm_{1}: Length[unitTiles1_{1}] + Length[unitTiles1Neg_{1}] ≠ 0
linearTerm_{1}: Length[xTiles1_{1}] + Length[xTiles1Neg_{1}] ≠ 0
VerticalSepVertex1_{1}: (-1.2, 2.32583)
VerticalSepVertex2_{1}: (x(VerticalSepVertex1_{1}), Min[Element[positionTiles2_{1}, Length[positionTiles2_{1}]], -2])
vertSeg_{1} = Segment(VerticalSepVertex1_{1}, VerticalSepVertex2_{1})
hGL'_{1} = Translate(hGL_{1}, Vector[(Vector[Corner[4], Corner[1]] / 500 * 16)])
HorSepVertex1_{1} = (-3, 0.6415943111111029)
HorSepVertex2_{1}: (Max[Element[positionTiles1_{1}, Length[positionTiles1_{1}]], 5.3], y(HorSepVertex1_{1}))
horSeg_{1} = Segment(HorSepVertex1_{1}, HorSepVertex2_{1})
textLinearFactor_{1}: "\textcolor{" + (LaTeX[If[aa_{1} ≟ 0, "", If[aa_{1} ≥ 0, colorPurpleDark_{1}, colorPink_{1}]]]) + "}{" + (LaTeX[If[aa_{1} ≟ 1 ∨ aa_{1} ≟ 0, "", aa_{1} ≟ -1, "-", Text[aa_{1}]]]) + "" + (LaTeX[If[aa_{1} ≠ 0, "x", ""]]) + "}" + (LaTeX[If[aa_{1} ≠ 0 ∧ bb_{1} > 0, "+", ""]]) + "" + (LaTeX[If[bb_{1} ≟ 0, "", If[bb_{1} ≥ 0, (((("\textcolor{" * colorPurpleDark_{1}) * "}{") * bb_{1}) * "}"), ((((" \textcolor{" * colorPink_{1}) * "}{") * bb_{1}) * "}")]]]) + "{" + (LaTeX[If[aa_{1} ≟ 0 ∧ bb_{1} ≟ 0, "0"]]) + "}"
textConstantFactor_{1}: "\color{" + (LaTeX[If[dd_{1} ≟ 0, "", If[dd_{1} ≥ 0, colorPurpleDark_{1}, colorPink_{1}]]]) + "}" + (LaTeX[dd_{1}]) + ""
slp_{1}: (aa_{1} * dd_{1})
ord_{1}: (dd_{1} * bb_{1})
textBelow_{1}: "" + (LaTeX[If[dd_{1} ≟ -1, (("\textcolor{" * colorPink_{1}) * "} {-} "), dd_{1} ≟ 1, "", (((("\textcolor{" * colorPink_{1}) * "}{") * textConstantFactor_{1}) * "}")]]) + "" + (LaTeX[If[dd_{1} ≟ 1, "", consTerm_{1} ∧ linearTerm_{1} ∨ aa_{1} < 0 ∨ aa_{1} ≟ 0 ∧ bb_{1} < 0, "(", "\cdot"]]) + "" + (LaTeX[textLinearFactor_{1}]) + "" + (LaTeX[If[dd_{1} ≟ 1, "", consTerm_{1} ∧ linearTerm_{1} ∨ aa_{1} < 0 ∨ aa_{1} ≟ 0 ∧ bb_{1} < 0, ")", ""]]) + "=" + (LaTeX[If[slp_{1} ≟ 0, "", If[slp_{1} ≥ 0, (((("\textcolor{" * colorPurpleDark_{1}) * "}{") * Polynomial[(slp_{1} * x)]) * "}"), (((("\textcolor{" * colorPink_{1}) * "}{") * Polynomial[(slp_{1} * x)]) * "}")]]]) + "" + (LaTeX[If[slp_{1} ≠ 0 ∧ ord_{1} > 0, "+", ""]]) + "" + (LaTeX[If[ord_{1} ≟ 0, "", If[ord_{1} ≥ 0, (((("\textcolor{" * colorPurpleDark_{1}) * "}{") * ord_{1}) * "}"), (((("\textcolor{" * colorPink_{1}) * "}{") * ord_{1}) * "}")]]]) + "" + (LaTeX[If[slp_{1} ≟ 0 ∧ ord_{1} ≟ 0, Text[0], ""]]) + ""
textConstantFactorPositioned_{1} = Text(textConstantFactor_{1}, VerticalSepVertex2_{1}, true, true, -1, 1)
width_{1}: ((x(HorSepVertex2_{1}) - x(VerticalSepVertex2_{1})) * 800 / (x(Cor3_{1}) - x(Cor1_{1})))
activeMinus1Vert_{1}: maxV_{1} ≤ 11 ∨ Defined[IndexOf[1, tiles2_{1}]]
active1Vert_{1}: maxV_{1} ≤ 11 ∨ Defined[IndexOf[-1, tiles2_{1}]]
activeXHor_{1}: maxH_{1} ≤ 23 ∨ Length[xTiles1Neg_{1}] ≠ 0
activeXHorNeg_{1}: maxH_{1} ≤ 23 ∨ Length[xTiles1_{1}] ≠ 0
activeUnitHor_{1}: maxH_{1} ≤ 27 ∨ Length[unitTiles1Neg_{1}] ≠ 0
activeUnitHorNeg_{1}: maxH_{1} ≤ 27 ∨ Length[unitTiles1_{1}] ≠ 0
A_{1}: (x(HorSepVertex2_{1}), y(VerticalSepVertex2_{1}))
f_{1} = Segment(VerticalSepVertex2_{1}, A_{1})
g_{1} = Segment(A_{1}, HorSepVertex2_{1})
textBelowPositioned_{1} = Text(centerText[(width_{1} * " px"), textBelow_{1}], Midpoint[f_{1}], true, true, 0, 1)
onboarding_{1}: false
pulsingSpeed_{1}: 8
onboarding_{2} = false
onboardingX_{1}: 401 + 24
onboardingY_{1} = 54
onboardingCase_{1} = 1
OnboardingTextOffset_{1} = onboardingTextOffset(Corner[onboardingText_{1}, 1], Corner[onboardingText_{1}, 3], onboardingCase_{1}, Corner[1], Corner[3], Corner[5])
onboardingDisplayText_{1}: "\text{\vphantom{Og}" + (LaTeX[onboardingText_{1}]) + "}"
pulsingObject'_{1} = Translate(pulsingObject_{1}, Vector[(((176 - 116) / 800 * x(Corner[2] - Corner[1])), 0)])
pulsingObject'_{2} = Translate(pulsingObject_{1}, Vector[(((252 - 116) / 800 * x(Corner[2] - Corner[1])), 0)])
pulsingObject'_{3} = Translate(pulsingObject_{1}, Vector[(((312 - 116) / 800 * x(Corner[2] - Corner[1])), 0)])
pulsingObject'_{4} = Translate(pulsingObject_{1}, Vector[B1_{1}, B_{1}])
pulsingObject'_{5} = Translate(pulsingObject'_{4}, (0, ((118 - 170) / 500 * y(Corner[4] - Corner[1]))))
grey_{1}: 148 / 255
labelToggleButton: "\textsf{" + (LaTeX[If[yourSolution, "POSSIBLE SOLUTION", "YOUR SOLUTION"]]) + "}"
equivalent: correct1 ∧ correct2 ∧ (¬correct)
colorNeg: If[¬yourSolution, {224, 116, 21}, {218, 37, 112}] / 255
colorPos: If[yourSolution, {101, 87, 210}, {0, 132, 117}] / 255
h(x) = x
tabOrder: {textQuestion, btnXHor_{1}, btnXHorNeg_{1}, btnUnitHor_{1}, btnUnitHorNeg_{1}, btnUnitVertActive_{1}, btnUnitVertNeg_{1}, btnRestart, btnValidate, textHint, textSolution, btnToggleSol, btnNew}
l1 = Zip(Segment[Midpoint[ss] - (0.2, 0.2), Midpoint[ss] + (0.2, 0.2)], ss, xTiles1Neg_{1})
xTilesHor = RemoveUndefined(Flatten[xTiles3HorNeg_{1}])
l2 = Zip(Segment[Midpoint[ss] - (0.2, 0.2), Midpoint[ss] + (0.2, 0.2)], ss, xTilesHor)

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

InputPixels: (100, 200)
xRight: x(Corner3)
xLeft: x(Corner1)
yTop: y(Corner3)
yBottom: y(Corner1)
yCoord: yTop - (y(InputPixels) / y(Corner5) * (yTop - yBottom))
xCoord: (x(InputPixels) / x(Corner5) * (xRight - xLeft)) + xLeft
OutputPoint: (xCoord, yCoord)

Tool: expandSegment
expandSegment(A,B,pixelGap,Corner1,Corner3,Corner5)
Input: A, B, pixelGap, Corner1, Corner3, Corner5
Output: newPoly

distanceX: (pixelGap / x(Corner5) * (x(Corner3) - x(Corner1)))
distanceY: (pixelGap / y(Corner5) * (y(Corner3) - y(Corner1)))
pointGap: distanceX
xyScale: distanceY / distanceX
A: (0, 0)
vecAB: B - A
pVec: (20 * UnitVector[(((-y(vecAB))) / xyScale, (x(vecAB) * xyScale))])
pVecAngle = Angle(xAxis, Line[(0, 0), pVec])
realAngle = If(pVecAngle ≟ pi / 2 ∨ pVecAngle ≟ (3 * pi / 2), pVecAngle, atand(tan(pVecAngle) / xyScale))
curveFunction = CurveCartesian((pointGap * cos(u)), ((pointGap * xyScale) * sin(u)), u, 0, (2 * pi))
K: curveFunction(realAngle)
vSpace = Vector(K)
allPoints: {A + vSpace, A - vSpace, B - vSpace, B + vSpace}
newPoly = Polygon(allPoints)

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: centerText
centerText(sizeStr,textStr)
Input: sizeStr, textString
Output: centeredLatex

this is dynamic centered text

centeredLatex: (((("\begin{tabular}\hspace{" * sizeStr) * "}\\") * textString) * "\end{tabular}")

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: onboardingTextOffset (command onboardingTextOffset11)
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: expandQuad
expandQuad(A,B,C,D,pixelGap,Corner1,Corner3,Corner5)
Input: A, B, C, D, pixelGap, Corner1, Corner3, Corner5
Output: newPolygon

Corner5: (800, 500)
Corner3: (7, 6)
Corner1: (-4, -2)
distanceY: (pixelGap / y(Corner5) * (y(Corner3) - y(Corner1)))
distanceX: (pixelGap / x(Corner5) * (x(Corner3) - x(Corner1)))
pointGap: distanceX
allVerts: {A, B, C, D}
concaveAngles = Zip(Angle[I, J, K] > 180°, I, Append[allVerts(-1), allVerts], J, allVerts, K, Append[Take[allVerts, 2], allVerts(1)])
allVecs = Zip(Vector[J, K], J, allVerts, K, Append[Take[allVerts, 2], allVerts(1)])
pVecs = Zip(Vector[UnitOrthogonalVector[A]], Vector[A], allVecs)
xyScale: (distanceY) / (distanceX)
circTemplate = CurveCartesian((pointGap * cos(t)), ((xyScale * pointGap) * sin(t)), t, 0, (2 * pi))
scaledVecs = Zip(Vector[(x(K), (xyScale * y(K)))], Vector[K], pVecs)
vPointsPre = Zip(A - (pointGap * B), A, allVerts, B, Append[scaledVecs(-1), scaledVecs])
vPointsPost = Zip(A - (pointGap * B), A, allVerts, Vector[B], scaledVecs)
endAngles = Zip(Angle[M + (1, 0), M, K], K, vPointsPost, M, allVerts)
startAngles = Zip(Angle[M + (1, 0), M, K], K, vPointsPre, J, vPointsPost, M, allVerts)
roundedCornersConvex = Zip(Sequence[circTemplate(K) + A, K, B, C + If[B > C, (2 * pi), 0], (C + If[B > C, (2 * pi), 0] - B) / 4], A, allVerts, B, endAngles, C, startAngles)
roundedCornersConcave = Zip(Sequence[circTemplate(K) + A, K, B, C + If[B > C, (2 * pi), 0], (C + If[B > C, (2 * pi), 0] - B) / 4], A, allVerts, B, startAngles, C, endAngles)
cornerAngles = Zip(Angle[A, B, C], A, vPointsPre, B, allVerts, C, vPointsPost)
cornerPoints = Flatten(Zip[If[¬Concave, {Element[D, 3]}, If[A < pi / 3 ∨ (¬Concave), {Element[C, 3]}, C]], A, cornerAngles, C, roundedCornersConcave, D, roundedCornersConvex, Concave, concaveAngles])
newPolygon = Polygon(cornerPoints)

Tool: centerText (command centerText1)
centerText(sizeStr,textStr)
Input: sizeStr, textString
Output: centeredLatex

this is dynamic centered text

centeredLatex: (((("\begin{tabular}\hspace{" * sizeStr) * "}\\") * textString) * "\end{tabular}")

Tool: onboardingTextOffset (command onboardingTextOffset2)
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: expandQuad (command expandQuad1)
expandQuad(A,B,C,D,pixelGap,Corner1,Corner3,Corner5)
Input: A, B, C, D, pixelGap, Corner1, Corner3, Corner5
Output: newPolygon

Corner5: (800, 500)
Corner3: (7, 6)
Corner1: (-4, -2)
distanceY: (pixelGap / y(Corner5) * (y(Corner3) - y(Corner1)))
distanceX: (pixelGap / x(Corner5) * (x(Corner3) - x(Corner1)))
pointGap: distanceX
allVerts: {A, B, C, D}
concaveAngles = Zip(Angle[I, J, K] > 180°, I, Append[allVerts(-1), allVerts], J, allVerts, K, Append[Take[allVerts, 2], allVerts(1)])
allVecs = Zip(Vector[J, K], J, allVerts, K, Append[Take[allVerts, 2], allVerts(1)])
pVecs = Zip(Vector[UnitOrthogonalVector[A]], Vector[A], allVecs)
xyScale: (distanceY) / (distanceX)
circTemplate = CurveCartesian((pointGap * cos(t)), ((xyScale * pointGap) * sin(t)), t, 0, (2 * pi))
scaledVecs = Zip(Vector[(x(K), (xyScale * y(K)))], Vector[K], pVecs)
vPointsPre = Zip(A - (pointGap * B), A, allVerts, B, Append[scaledVecs(-1), scaledVecs])
vPointsPost = Zip(A - (pointGap * B), A, allVerts, Vector[B], scaledVecs)
endAngles = Zip(Angle[M + (1, 0), M, K], K, vPointsPost, M, allVerts)
startAngles = Zip(Angle[M + (1, 0), M, K], K, vPointsPre, J, vPointsPost, M, allVerts)
roundedCornersConvex = Zip(Sequence[circTemplate(K) + A, K, B, C + If[B > C, (2 * pi), 0], (C + If[B > C, (2 * pi), 0] - B) / 4], A, allVerts, B, endAngles, C, startAngles)
roundedCornersConcave = Zip(Sequence[circTemplate(K) + A, K, B, C + If[B > C, (2 * pi), 0], (C + If[B > C, (2 * pi), 0] - B) / 4], A, allVerts, B, startAngles, C, endAngles)
cornerAngles = Zip(Angle[A, B, C], A, vPointsPre, B, allVerts, C, vPointsPost)
cornerPoints = Flatten(Zip[If[¬Concave, {Element[D, 3]}, If[A < pi / 3 ∨ (¬Concave), {Element[C, 3]}, C]], A, cornerAngles, C, roundedCornersConcave, D, roundedCornersConvex, Concave, concaveAngles])
newPolygon = Polygon(cornerPoints)