#4D4D4D

$\text{TRY AGAIN}$

$\text{NEW LINES}$

Reset app

#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 the first number line so its points will fall into the spots in the number line below.
} 

allRandoms = RandomUniform(0, 0.99, 200)
countQuestion = 0
pixelWidth: abs(x(Corner[1]) - x(Corner[3])) / 800
numRandoms: 5
randIndex: (Mod[countQuestion, floor(Length[allRandoms] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandoms, randIndex, randIndex + numRandoms - 1)
randomMultiplier = If(countQuestion > 0, 2 + floor((currentRandomSeeds(1) * 3)), 2)
numPoints: floor(12 / randomMultiplier)
randomStart = If(countQuestion > 0, If[abs(-3 + floor((currentRandomSeeds(3) * 3))) < numPoints, -3 + floor((currentRandomSeeds(3) * 3)), (-(numPoints - 1))], -3)
DragDomain = Sequence((n, 3), n, numPoints + randomStart + 2, 20)
DragPoint = Point(DragDomain)
RatioPoint: DragPoint - (1, 0)
dragRatio: x(RatioPoint) / (numPoints + 1 + randomStart)
correct: dragRatio ≟ randomMultiplier
overstretched: dragRatio ≟ (randomMultiplier * 2) ∧ (¬correct)
textSizeFeedback: "\text{" + (LaTeX[If[correct, "You got it!", overstretched, "Can you also fill this spot?", "Oops, you missed."]]) + "}"
widthFeedback: abs(x(Corner[textSizeFeedback, 1]) - x(Corner[textSizeFeedback, 3]))
pixelFeedbackW: widthFeedback / pixelWidth
PointsTop = Sequence((n, 3), n, 0, numPoints + 1)
PointsBottom: ((x(PointsTop) * randomMultiplier), 0)
PointsDilated: ((x(First[PointsTop, numPoints + randomStart + 2]) * dragRatio), 3)
PointsDilatedBottom = Zip((x(n), 0), n, PointsDilated)
MissedPoints = Flatten({KeepIf[(¬(n ∈ PointsDilatedBottom)) ∧ x(n) < Max[x(PointsDilatedBottom)], n, PointsBottom], KeepIf[¬(n ∈ PointsBottom), n, PointsDilatedBottom]})
showbuttons = true
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)}])
Dims = Corner(5)
PointsBottomCopy: PointsBottom
animationSlider = 0 (slider from 0 to 20, step 0.1)
PointsAnimated = Zip(PartitionPoint[a, (x(a), 0), animationSlider, 20], a, PointsDilated)
speed: (0.1 * (animationSlider + 3)^(2))
pointDropped = false
topLine = Segment(PointsDilated(1), DragPoint)
speed2: 1
topLineAnimated = Segment(PointsDilated(1), PointsDilated(numPoints + randomStart + 2))
PointsDilatedCopy: PointsDilated
randomMultiplierStart = If(countQuestion > 0, 2 + floor((currentRandomSeeds(2) * 3)), 4)
tabOrder: {textQuestion, DragPoint, btnTryAgain, btnNew}
ArrowPointRef = ClosestPoint(MissedPoints, (4, 0))
ArrowPoint1 = PixelsToPoint(Corner[1], Corner[3], Corner[5], (619 - pixelFeedbackW - 8, 448))
ArrowPoint2 = PartitionPoint(ArrowPointRef, ArrowPoint1, 1, 5)
arrowSegment = Segment(ArrowPoint1, ArrowPoint2)
labelsBottomValues = Zip(Text[If[countQuestion > 1, (x(n) * randomMultiplierStart), x(n)]], n, PointsBottom)
labelsBottom = Zip(Text[k, n - (If[Length[k] ≟ 1, 0.2, 0.3], 0.6), true, true], n, PointsBottom, k, labelsBottomValues)
labelsTopValues = Zip(Text["" + (If[dragRatio ≠ 0, If[countQuestion > 1, (x(n) * randomMultiplierStart), x(n)] / dragRatio, 0]) + (If[dragRatio > 1, "\cdot" + (FractionText[dragRatio]), ""])] + "", n, PointsDilated)
labelsTop = Zip(Text[k, n - (If[dragRatio ≟ 1, 0.2, Length[k] ≟ 1, 0.5, 0.45], -1.3), true, true], n, PointsDilated, k, labelsTopValues)
ballBounce(x) = abs((8 * sin((pi * x)) / ℯ^(x))) + 0.2
ballAnimation = 1 (slider from 1 to 3, step 0.001)
PointsBounceStart = KeepIf(¬(n ∈ PointsBottom), n, PointsDilatedBottom)
PointsBounce: (x(PointsBounceStart), ballBounce(ballAnimation))
ballSpeed: 5
PointsCaught = KeepIf(n ∈ PointsBottom, n, PointsDilatedBottom)
bottomLine = Segment(PointsBottom(1), (20, 0))
textFeedback: "" + (LaTeX[textSizeFeedback]) + ""
dimensions: {-0.8854961317956567, -4.61630222478146, 17.375361909775457, 6.813814922955772}
onboarding = true
pulsingSpeed: 8
pulsing = 0.8 (slider from 0 to 1, step 0.1)
onboardingCoords = PointToPixels(Corner[1], Corner[3], Corner[5], DragPoint - (0.1, 0))
onboardingX: x(onboardingCoords)
onboardingY: y(onboardingCoords) + 24 + 16
onboardingCase: 4
pulsingObject = circlePixels(DragPoint - (0.1, 0), 2 + (10 * pulsing), Corner[1], Corner[3], Corner[5])

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: PixelsToPoint (command PixelsToPoint1)
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: PartitionPoint
PartitionPoint(P1,P2,Num,Den)
Input: SimMove, solutionPoint, animation1Slider, animation1Range
Output: Animation1Point

$\textbf{\mathsf{F}}$

Animation1Point: SimMove + (animation1Slider * (solutionPoint - SimMove) / animation1Range)

Tool: PixelsToDistance
PixelsToDistance[ <Number>, <Point>, <Point>, <Point> ]
Input: InputPixels, Corner1, Corner3, Corner5
Output: OutputDistance

InputPixels: 5
xLeft: x(Corner1)
xRight: x(Corner3)
OutputDistance: (InputPixels / x(Corner5) * (xRight - xLeft))

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: 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)

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)