$a=\vphantom{b}$

\text{Drag to place}

#4D4D4D

$\text{Check}$

$\text{NEW PROBLEM}$

Fix position and allow selection for all text objects

Empty all input boxes

\text{\bold{Solution}\
}

$b=$

Reset app

\textsf{Write your answer as a number. }

#006758

#B00020

#252525

#757575

#949494

#E44461

#DA2570

#E66B9E

#3A6ED6

#5991FF

#008475

#0F8538

#00a83c

#5145A8

#6557D2

#8575FF

#903D14

#BD6C43

#C75000

#E07415

\textsf{Use the strip diagram to help visualize the problem. }

#eeeeee

#2E006758

#2EB00020

Organize

\text{Slide to solve}

allRandomSeeds = RandomUniform(0, 0.99, 200)
tempInput1: NaN
input1 = NaN
InputBox1 = Textfield(input1)
inputText = Text(InputBox1)
countQuestion = 0
numRandoms: 5
randIndex: (Mod[countQuestion, floor(Length[allRandomSeeds] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1)
spaceBetween: 0.5
heightStrip: 1.01
pointStrip1 = (1.5055260536585269, 5.450020938147119)
lengthStrip: 3.6
pointStrip2: pointStrip1 + (0, (-heightStrip) - 0.1)
indexQuestion: 1 + floor((currentRandomSeeds(4) * 4))
isAddition: indexQuestion ≟ 1
isSubtraction: indexQuestion ≟ 2
num1: 2 + floor((currentRandomSeeds(3) * 6))
num2Start = If(isAddition ∨ isSubtraction, num1 + 2, 2)
num2: num2Start + floor((currentRandomSeeds(4) * 6))
unitLengthSubtraction: lengthStrip / (num1 + num2)
subS2P1: pointStrip2 + ((unitLengthSubtraction * num2), 0)
noOperations: (¬Defined[IndexOf["*", inputText]]) ∧ (¬Defined[IndexOf["+", inputText]]) ∧ (¬Defined[IndexOf["-", inputText]]) ∧ (¬Defined[IndexOf["/", inputText]])
num1Mult: 2 + floor((currentRandomSeeds(3) * 6))
num2Mult: (num1Mult * (2 + floor((currentRandomSeeds(2) * 4))))
num2Div: 1 + floor((currentRandomSeeds(2) * 4))
num1Div: 2 + floor((currentRandomSeeds(1) * 4))
answer = Element({num2 - num1, num1 + num2, num2Mult / num1Mult, (num1Div * num2Div)}, indexQuestion)
animateStartPointS2: pointStrip2 + (lengthStrip + spaceBetween, 0)
greyNum: 0.1451
animateControl = 0 (slider from 0 to 1, step 0.01)
animateAddition = If(isAddition, animateControl, 0)
equationStart: (7.54607, y(pointStrip2) + heightStrip / 2)
spaceBetweenEquationLines: 0.5
equationPoints = Sequence(equationStart + ((0, (-spaceBetweenEquationLines)) * k), k, 0, 2)
indexVariable: 1 + floor(currentRandomSeeds(2))
variable = Element({"x", "y"}, indexVariable)
isDivision: indexQuestion ≟ 4
spaceHome: 0.75
startHome = (2.1306530084379602, 6.033345623327891)
allHomeAnchors = Sequence(startHome + (k * (spaceHome, 0)), k, 0, 10)
numDragBoxes: 8
boxWidth: 0.5
onboardingPoint: allHomeAnchors(numDragBoxes) + (boxWidth / 2, 0)
onboardingPointPixels = PointToPixels(onboardingPoint, Corner[1], Corner[3], Corner[5])
spaceEnd: 1
startEnd = (2.1158302491435714, 4.832702120482396)
boxAnchors = Sequence(startEnd + (K * (spaceEnd, 0)), K, 0, 10)
boxHeight: 0.5
frame8 = centerBox(boxWidth, boxHeight, boxAnchors(8))
frame7 = centerBox(boxWidth, boxHeight, boxAnchors(7))
frame6 = centerBox(boxWidth, boxHeight, boxAnchors(6))
frame5 = centerBox(boxWidth, boxHeight, boxAnchors(5))
frame4 = centerBox(boxWidth, boxHeight, boxAnchors(4))
frame3 = centerBox(boxWidth, boxHeight, boxAnchors(3))
frame2 = centerBox(boxWidth, boxHeight, boxAnchors(2))
frame1 = centerBox(boxWidth, boxHeight, boxAnchors(1))
P7 = (6.63065300843796, 6.033345623327891)
P8 = (7.38065300843796, 6.033345623327891)
P6 = (5.88065300843796, 6.033345623327891)
P5 = (5.13065300843796, 6.033345623327891)
P4 = (4.38065300843796, 6.033345623327891)
P3 = (3.6306530084379602, 6.033345623327891)
P2 = (2.8806530084379602, 6.033345623327891)
P1 = (2.1306530084379602, 6.033345623327891)
correctOrder: {1, 2, 3, 4, 5, 6, 7, 8}
currentLocations: {-1, -1, -1, -1, -1, -1, -1, -1}
randomNum1: 3 + floor((currentRandomSeeds(1) * 15))
onboarding = false
inputSaved: {NaN}
input2 = NaN
inputCurrent: {inputText, tempInput1}
B = (5.000341064524864, 5.69392166828734)
randomNum2: randomNum1 + 2 + floor((currentRandomSeeds(2) * 10))
validate = false
showanswer = false
showsolution = false
tries = 0
countCorrect = 0
showhint = false
InputBox2 = Textfield(input2)
correct: input1 ≟ answer ∧ noOperations
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)
pixelsRight: 16
pixelsLeft: 16
pixelsBottom: 16
pixelsTop: 24
layoutY: 120 - 4
enableInput: tries < 3 ∧ (¬(validate ∧ correct))
layoutX: 50 + 62 + 16
layoutAppSize = Corner(5)
textFeedback: "" + (LaTeX[If[correct, "$\text{✓ Correct}$", "$\text{✕ " + (If[tries < 3, "Try again", "Maybe next time"]) + "}$"]]) + ""
pulsingSpeed: 8
pulsing = 0.9 (slider from 0 to 1, step 0.1)
haloPixels: (pulsing * 7)
onboardingDisplayText: "" + (LaTeX[onboardingText]) + ""
A = (4.591072725036432, 5.892161020227049)
C = (4.917208433066277, 6.084005554362252)
layoutOnboarding = PointToPixels(Corner[onboardingDisplayText, 2], Corner[1], Corner[3], Corner[5])
onboardingX: x(onboardingPointPixels) + 16
onboardingY: y(onboardingPointPixels) + 12
onboardingCase: 1
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
organizing = false
tmpIndex = NaN
HOME: -1
homeIndices = Sequence(k, k, 1, 10)
homeLocations = Zip(allHomeAnchors(J), J, homeIndices)
movingPoints = Take({P1, P2, P3, P4, P5, P6, P7, P8}, 1, numDragBoxes)
movingIndex = NaN
box1 = centerBox(boxWidth, boxHeight, P1)
box2 = centerBox(boxWidth, boxHeight, P2)
box3 = centerBox(boxWidth, boxHeight, P3)
box4 = centerBox(boxWidth, boxHeight, P4)
box5 = centerBox(boxWidth, boxHeight, P5)
box6 = centerBox(boxWidth, boxHeight, P6)
PMove = Element(movingPoints, movingIndex)
frameList: {frame1, frame2, frame3, frame4, frame5, frame6, frame7, frame8}
highlightBox = centerBox(boxWidth, boxHeight, PMove)
boxText: {"\text{B1}", "\text{B2}", "\text{B3}", "\text{B4}", "\text{B5}", "\text{B6}", "\text{B7}", "\text{B8}"}
textHightlight = Text(("" * boxText(movingIndex)), If[Defined[PMove], PMove, (300, 300)], false, true, 0, 0)
allHome = Sequence(HOME, k, 1, numDragBoxes)
PTemp = (7.115830249143571, 4.832702120482396)
box7 = centerBox(boxWidth, boxHeight, P7)
box8 = centerBox(boxWidth, boxHeight, P8)
numFrames: 8
cmdSendHome = Sequence((((("SetValue(P" * K) * ",homeLocations(") * K) * "))"), K, 1, numDragBoxes)
showDrag: false
boxTextDisplay = Zip(Text[("" * K), J, true, true, 0, 0], K, Take[boxText, 1, numDragBoxes], J, Take[movingPoints, 1, numDragBoxes])
pulsingBox1 = expandQuad(Vertex[box1, 1], Vertex[box1, 2], Vertex[box1, 3], Vertex[box1, 4], (7 * pulsing), Corner[1], Corner[3], Corner[5])
pulsingBox2 = expandQuad(Vertex[box2, 1], Vertex[box2, 2], Vertex[box2, 3], Vertex[box2, 4], (7 * pulsing), Corner[1], Corner[3], Corner[5])
pulsingBox3 = expandQuad(Vertex[box3, 1], Vertex[box3, 2], Vertex[box3, 3], Vertex[box3, 4], (7 * pulsing), Corner[1], Corner[3], Corner[5])
pulsingBox4 = expandQuad(Vertex[box4, 1], Vertex[box4, 2], Vertex[box4, 3], Vertex[box4, 4], (7 * pulsing), Corner[1], Corner[3], Corner[5])
pulsingBox5 = expandQuad(Vertex[box5, 1], Vertex[box5, 2], Vertex[box5, 3], Vertex[box5, 4], (7 * pulsing), Corner[1], Corner[3], Corner[5])
pulsingBox6 = expandQuad(Vertex[box6, 1], Vertex[box6, 2], Vertex[box6, 3], Vertex[box6, 4], (7 * pulsing), Corner[1], Corner[3], Corner[5])
pulsingBox7 = expandQuad(Vertex[box7, 1], Vertex[box7, 2], Vertex[box7, 3], Vertex[box7, 4], (7 * pulsing), Corner[1], Corner[3], Corner[5])
pulsingBox8 = expandQuad(Vertex[box8, 1], Vertex[box8, 2], Vertex[box8, 3], Vertex[box8, 4], (7 * pulsing), Corner[1], Corner[3], Corner[5])
strip1 = makeBox(pointStrip1, lengthStrip, heightStrip)
isMultiplication: indexQuestion ≟ 3
questionSubtraction: "" + (LaTeX[variable]) + " \minus " + (LaTeX[num1]) + " = " + (LaTeX[num2]) + ""
questionMultiplication: "" + (LaTeX[num1Mult]) + "" + (LaTeX[variable]) + " = " + (LaTeX[num2Mult]) + ""
questionDivision: "" + (LaTeX[variable]) + "\div" + (LaTeX[num1Div]) + " = " + (LaTeX[num2Div]) + ""
questionAddition: "" + (LaTeX[variable]) + " + " + (LaTeX[num1]) + " = " + (LaTeX[num2]) + ""
question = Element({questionAddition, questionSubtraction, questionMultiplication, questionDivision}, indexQuestion)
textQuestion: "\textsf{Find the value of } " + (LaTeX[variable]) + ".\\\\\\\\" + (LaTeX[question]) + ""
strip2 = makeBox(pointStrip2, lengthStrip, heightStrip)
unitLengthAddition: lengthStrip / num2
additionS1P1: pointStrip1 + (((num2 - num1) * unitLengthAddition), 0)
additionS2P1: pointStrip2 + (((num2 - num1) * unitLengthAddition), 0)
addS1XBox = makeBox(pointStrip1, (unitLengthAddition * (num2 - num1)), heightStrip)
addS1NumBox = makeBox(additionS1P1, (num1 * unitLengthAddition), heightStrip)
addS2XBox = Translate(addS1XBox, Vector[pointStrip1, pointStrip2])
addS2NumBox = Translate(addS1NumBox, Vector[additionS1P1, additionS2P1])
addS2WholeBox = makeBox(pointStrip2, lengthStrip, heightStrip)
additionS1XLabel: (pointStrip1 + additionS1P1) / 2 + (0, ((-heightStrip)) / 2)
additionS1NumLabel: additionS1P1 + ((num1 * unitLengthAddition / 2), ((-heightStrip)) / 2)
additionS2AnswerLabel: pointStrip2 + (((num2 - num1) * unitLengthAddition / 2), ((-heightStrip)) / 2)
additionS2Num1Label: additionS2P1 + ((num1 * unitLengthAddition / 2), ((-heightStrip)) / 2)
additionS2Num2Label: pointStrip2 + ((num2 * unitLengthAddition / 2), ((-heightStrip)) / 2)
additionS1X = Text((("" * variable) * ""), additionS1XLabel, true, true, 0, 0)
additionS1Num1 = Text((("" * num1) * ""), additionS1NumLabel, true, true, 0, 0)
additionS2Answer = Text((("" * answer) * ""), additionS2AnswerLabel, true, true, 0, 0)
additionS2Num2 = Text((("" * num2) * ""), additionS2Num2Label, true, true, 0, 0)
colorX: colorPink
colorNegative: colorGreenLight
colorNum2: colorPurpleLight
lineStart: (equationPoints(2) + equationPoints(3)) / 2 - (1, 0)
equationLine = Segment(lineStart, lineStart + (2, 0))
showVisual: showhint ∨ showsolution
subS1XBox = makeBox(pointStrip1, lengthStrip, heightStrip)
subS1P1: pointStrip1 + ((num2 * unitLengthSubtraction), 0)
subS2Num1Box = makeBox(pointStrip2, (unitLengthSubtraction * num2), heightStrip)
subS2NumBox = makeBox(subS2P1, (unitLengthSubtraction * num1), heightStrip)
animateSubtraction = If(isSubtraction, animateControl, 0)
subS1XLabelPos: pointStrip1 + (lengthStrip / 2, ((-heightStrip)) / 2)
subS2Num1LabelPos: (pointStrip2 + subS2P1) / 2 + (0, ((-heightStrip)) / 2)
subS2Num2LabelPos: subS2P1 + ((num1 * unitLengthSubtraction / 2), 0) + (0, ((-heightStrip)) / 2)
subS2AnswerLabelPos: pointStrip2 + (lengthStrip / 2, ((-heightStrip)) / 2)
subS1NumLabelPos: subS2P1 + ((num1 * unitLengthSubtraction / 2), ((-heightStrip)) / 2)
subS1XLabel = Text(variable, subS1XLabelPos, true, true, 0, 0)
subS1NumLabelNeg = Text((("\minus" * num1) * ""), subS1NumLabelPos, true, true, 0, 0)
subS2Num1Label = Text((("" * num2) * ""), subS2Num1LabelPos, true, true, 0, 0)
subS2AnswerLabel = Text(answer, subS2AnswerLabelPos, true, true, 0, 0)
subS2Num2Label = Text(num1, subS2Num2LabelPos, true, true, 0, 0)
subS1NumLabel = Text((("" * num1) * ""), subS1NumLabelPos, true, true, 0, 0)
subS2SolBox = makeBox(pointStrip2, lengthStrip, heightStrip)
animateAdditionFade = If(animateAddition ≤ 0.5, greyNum, ((animateAddition - 0.5) * 2))
multS1FullBox = makeBox(pointStrip1, lengthStrip, heightStrip)
multS2FullBox = makeBox(pointStrip2, lengthStrip, heightStrip)
unitLengthMult: lengthStrip / num2Mult
animateMultiplication = If(isMultiplication, animateControl, 0)
multS2TopPoints = Sequence(pointStrip2 + (((unitLengthMult * answer), 0) * k), k, 1, num1Mult - 1)
multS1TopPoints = Sequence(pointStrip1 + (((unitLengthMult * answer), 0) * k), k, 1, num1Mult - 1)
multS1LabelPoints = Sequence(pointStrip1 + (((unitLengthMult * answer) * k), 0) + ((unitLengthMult * answer / 2), ((-heightStrip)) / 2), k, 0, num1Mult - 1)
multS2LabelPoints = Sequence(pointStrip2 + (((unitLengthMult * answer) * k), 0) + ((unitLengthMult * answer / 2), ((-heightStrip)) / 2), k, 0, num1Mult - 1)
multS2Segs = Zip(Segment[A, A + ((0, (-heightStrip)) * animateMultiplication)], A, multS2TopPoints)
multS1Labels = Zip(Text[variable, A, true, true, 0, 0], A, multS1LabelPoints)
multS2LabelsAnswer = Zip(Text[(("" * answer) * ""), A, true, true, 0, 0], A, multS2LabelPoints)
multS2LabelPoint: pointStrip2 + (lengthStrip / 2, ((-heightStrip)) / 2)
multS2Label = Text((("" * num2Mult) * ""), multS2LabelPoint, true, true, 0, 0)
unitLengthDiv: lengthStrip / ((num1Div * num2Div))
divStrip1Initial = makeBox(pointStrip1, lengthStrip / num1Div, heightStrip)
divStrip2Initial = makeBox(pointStrip2, lengthStrip / num1Div, heightStrip)
animateDivision = If(isDivision, animateControl, 0)
divS1TopPoints = Sequence(pointStrip1 + (k * ((num2Div * unitLengthDiv), 0)), k, 1, num1Div - 1)
divS2TopPoints = Sequence(pointStrip2 + (k * ((num2Div * unitLengthDiv), 0)), k, 1, num1Div - 1)
divS2LabelStart: pointStrip2 + ((lengthStrip / num1Div * 0.5), ((-heightStrip)) / 2)
divS1LabelStart: pointStrip1 + ((lengthStrip / num1Div * 0.5), ((-heightStrip)) / 2)
animateDivisionBoxes = Min(1, (animateDivision * 2))
divS1LabelPoints = Sequence(divS1LabelStart + (k * (lengthStrip / num1Div, 0)), k, 1, num1Div - 1)
divS2LabelPoints = Sequence(divS2LabelStart + (k * (lengthStrip / num1Div, 0)), k, 1, num1Div - 1)
divS2Label = Text((("" * num2Div) * ""), divS2LabelStart, true, true, 0, 0)
animateDivisionFade = If(animateDivision ≤ 0.5, greyNum, ((animateDivision - 0.5) * 2))
animateDivisionIncrease = If(animateDivision ≤ 0.5, 1, Max[((1 - animateDivision) * 2), greyNum])
divS1LabelCenter: pointStrip1 + (lengthStrip / 2, ((-heightStrip)) / 2)
divS2LabelCenter: pointStrip2 + (lengthStrip / 2, ((-heightStrip)) / 2)
divStrip1Outline = makeBox(pointStrip1, lengthStrip, heightStrip)
divStrip2Outline = makeBox(pointStrip2, lengthStrip, heightStrip)
divS1FinalLabel = Text((("" * variable) * ""), divS1LabelCenter, true, true, 0, 0)
divS2FinalLabel = Text((("" * answer) * ""), divS2LabelCenter, true, true, 0, 0)
subS2NumBoxPos: subS2NumBox
animateSubtractionFade = If(animateSubtraction < greyNum, greyNum, animateSubtraction)
animateSubtractionIncrease = If(1 - animateSubtraction > greyNum, 1 - animateSubtraction, greyNum)
multS1LabelPoint: pointStrip1 + (lengthStrip / 2, ((-heightStrip)) / 2)
multS1Label = Text((((("" * num1) * "") * variable) * ""), multS1LabelPoint, true, true, 0, 0)
textEquals = Text("=", pointStrip2 - (spaceBetween / 2, heightStrip / 2), true, true, 0, 0)
addS1NumBoxStatic: addS1NumBox
multS1Segs = Zip(Segment[A, A + (0, (-heightStrip))], A, multS1TopPoints)
animateStartPointS1: animateStartPointS2 + (0, (-heightStrip))
divStripInitialAnimateS1 = Translate(divStrip1Initial, Vector[pointStrip1, animateStartPointS1])
divStripInitialAnimateS2 = Translate(divStrip2Initial, Vector[pointStrip2, animateStartPointS2])
animateDivisionBoxesIndex: floor((animateDivisionBoxes * (num1Div - 1)))
animateDivisionBoxesMove: (animateDivisionBoxes * (num1Div - 1)) - animateDivisionBoxesIndex
divS2Boxes = Zip(Translate[divStripInitialAnimateS2, Vector[animateStartPointS2, K]], K, Take[divS2TopPoints, 1, animateDivisionBoxesIndex])
divMovingBox1 = Translate(divStripInitialAnimateS1, Vector[(animateDivisionBoxesMove * Vector[animateStartPointS1, divS1TopPoints(animateDivisionBoxesIndex + 1)])])
divMovingBox2 = Translate(divStripInitialAnimateS2, Vector[(animateDivisionBoxesMove * Vector[animateStartPointS2, divS2TopPoints(animateDivisionBoxesIndex + 1)])])
divS2Labels = Zip(Text[(("" * num2Div) * ""), divS2LabelStart + K - divS2LabelStart, true, true, 0, 0], K, Take[divS2LabelPoints, 1, animateDivisionBoxesIndex])
inputCaption: "" + (LaTeX[variable]) + " ="
questionS1 = Take(question, 1, IndexOf["=", question] - 2)
questionS2 = Take(question, IndexOf["=", question] + 1)
spaceBetweenEquation: 0.08
equationL1 = Sequence(equationStart + ((spaceBetweenEquation * k), 0), k, -1, 1)
equationL2 = Sequence(equationStart + (0, (-spaceBetweenEquationLines)) + ((spaceBetweenEquation * k), 0), k, -1, 1)
equationL3 = Sequence(equationStart + (0, (-2 * spaceBetweenEquationLines)) + ((spaceBetweenEquation * k), 0), k, -1, 1)
questionL1equals = Text("=", equationL1(2), true, true, 0, 0)
questionL3equals = Text("=", equationL3(2), true, true, 0, 0)
questionL1S1 = Text(questionS1, equationL1(1), true, true, -1, 0)
questionL1S2 = Text(questionS2, equationL1(3), true, true, 1, 0)
questionOp = Element({(("\minus" * num1) * ""), (("+" * num1) * ""), (("\div" * num1Mult) * ""), (("\times" * num1Div) * "")}, indexQuestion)
questionL2S1 = Text(questionOp, equationL2(1), true, true, -1, 0)
questionL2S2 = Text(questionOp, equationL2(3), true, true, 1, 0)
questionL3S1 = Text((("" * variable) * ""), equationL3(1), true, true, -1, 0)
questionL3S2 = Text((("" * answer) * ""), equationL3(3), true, true, 1, 0)
isTypicalError: ¬noOperations
textHint: "\textsf{\color{" + (LaTeX[colorOrange]) + "}\bold{Hint}}\\" + (LaTeX[If[showhinttypicalerror, helpTextHintTypicalError]]) + "" + (LaTeX[If[showhint ∧ showhinttypicalerror, " "]]) + "" + (LaTeX[If[showhint, helpTextHint]]) + ""
divS1Label = Text((((("" * variable) * "\div") * num1Div) * ""), divS1LabelStart, true, true, 0, 0)
divS2DashedBoxes = Zip(Translate[divStripInitialAnimateS2, Vector[animateStartPointS2, K]], K, Take[divS2TopPoints, animateDivisionBoxesIndex + 1, num1Div - 1])
animateAdditionDivide = Min((animateAddition * 2), 1)
additionSegS2 = Segment(additionS2P1, additionS2P1 + (0, ((-heightStrip) * animateAdditionDivide)))
additionS2Num1Neg = Text((("" * num1) * ""), additionS2Num1Label, true, true, 0, 0)
additionS1Num1Neg = Text((("" * num1) * ""), additionS1NumLabel, true, true, 0, 0)

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)

Tool: centerBox
(width,height,CenterPoint)
Input: width, length, StartPoint
Output: myBox

StartPoint: (0, 0)
A: StartPoint + (((-width)) / 2, ((-length)) / 2)
D: A + (0, length)
B: A + (width, 0)
C: A + (width, length)
myBox = Polygon({A, B, C, D})

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: makeBox
makeBox(point, width,height)
Input: PointText1, boxWidth, boxHeight
Output: BoxText1

PointText2: PointText1 + (boxWidth, 0)
PointText3: PointText2 - (0, boxHeight)
PointText4: PointText1 - (0, boxHeight)
BoxText1 = Polygon({PointText1, PointText2, PointText3, PointText4})