\text{Arrastra a los espacios vacíos}

#4D4D4D

$\text{Check}$

$\text{NUEVO}$

Fix position and allow selection for all text objects

Empty all input boxes

\text{This is the answer.}

$\math{g=}\vphantom{bg}$

$b=$

Reset app

\text{Asegúrate de que las unidades de medida se\
correspondan al plantear las fracciones:\
gotas con gotas, y onzas con onzas.}

#006758

#B00020

#252525

#757575

#949494

#E44461

#DA2570

#E66B9E

#3A6ED6

#5991FF

#008475

#0F8538

#00a83c

#5145A8

#6557D2

#8575FF

#903D14

#BD6C43

#C75000

#E07415

\text{Recuerda que las fracciones deben ser equivalentes.}

#eeeeee

#2E006758

#2EB00020

Play

$\bold\textsf{%v}$

\frac{\hspace{60}}{\hspace{20}}=\frac{\hspace{60}}{\hspace{20}}

box3

organize

btnPlaySolution

correctProportion = false
randomList1 = Shuffle(Sequence[4])
randomColor_{1} = Shuffle(Sequence[6])
randomList2 = Shuffle(Sequence[15])
randomX_{1} = Shuffle(Sequence[2, 16] \ {11, 13, 17, 19})
countQuestion = 0
countQuestion_{1}: countQuestion
X_{1} = Element(randomX_{1}, Mod[countQuestion_{1}, Length[randomX_{1}]] + 1)
randomY_{1} = Shuffle(KeepIf[Mod[CLIPBOARDmagicSTRINGii, X_{1}] ≟ 0 ∨ Mod[X_{1}, CLIPBOARDmagicSTRINGii] ≟ 0, CLIPBOARDmagicSTRINGii, Sequence[2, 16] \ {X_{1}}])
Y_{1} = Element(randomY_{1}, 1)
randoma_{1} = Shuffle(KeepIf[IsInteger[(CLIPBOARDmagicSTRINGii * Y_{1} / X_{1})] ∧ (CLIPBOARDmagicSTRINGii * Y_{1} / X_{1}) ≤ 20, CLIPBOARDmagicSTRINGii, Sequence[2, 20]])
randomNum1 = Element(randomList1, Mod[countQuestion, 20] + 1)
randomOrder = Shuffle(Sequence[4] \ {randomNum1})
input1 = NaN
a_{1} = Element(randoma_{1}, 1)
b_{1}: (a_{1} * Y_{1} / X_{1})
endDropping = If(correctProportion, b_{1}, input1)
Cor1Box4 = (3.73657, 4.55)
Cor1Box3 = (1.73657, 4.55)
Cor1Box2 = (-0.26343000000000005, 4.55)
DropArea1Corner: (-9.60752, 5.1)
boxHei: 1
boxWid: 1.2
dropArea1 = Polygon({DropArea1Corner, DropArea1Corner + (boxWid, 0), DropArea1Corner + (boxWid, boxHei), DropArea1Corner + (0, boxHei)})
dropArea3 = Translate(dropArea1, (2.25, 0))
DropArea3Corner = Vertex(dropArea3, 1)
dropArea4 = Translate(dropArea3, (0, -1.2))
DropArea4Corner = Vertex(dropArea4, 1)
dropArea2 = Translate(dropArea1, (0, -1.2))
DropArea2Corner = Vertex(dropArea2, 1)
TargetPositions: {DropArea1Corner, DropArea2Corner, DropArea3Corner, DropArea4Corner}
box4In = IndexOf(true, Zip[Cor1Box4 ≟ PP, PP, TargetPositions])
box3In = IndexOf(true, Zip[Cor1Box3 ≟ PP, PP, TargetPositions])
box2In = IndexOf(true, Zip[Cor1Box2 ≟ PP, PP, TargetPositions])
Cor1Box1 = (-2.26343, 4.55)
box1In = IndexOf(true, Zip[Cor1Box1 ≟ PP, PP, TargetPositions])
elementsOrdered = Sort({X_{1}, a_{1}, Y_{1}, b_{1}}, {box1In, box2In, box3In, box4In})
Cor2Box1: Cor1Box1 + (boxWid, 0)
Cor4Box1: Cor1Box1 + (0, boxHei)
Cor3Box1: Cor1Box1 + (boxWid, boxHei)
box1, f, g, h, i = Polygon(Cor1Box1, Cor2Box1, Cor3Box1, Cor4Box1)
distLimit: (Distance[DropArea1Corner, Centroid[dropArea1]] * 2)
allAreas: {dropArea1, dropArea2, dropArea3, dropArea4}
B = (5.000341064524864, 5.69392166828734)
input2 = NaN
inputSaved: {NaN, NaN}
inputCurrent: {box1In, box2In, box3In, box4In, input1}
randomNum2 = Element(randomList2, Mod[countQuestion, 15] + 1)
validate = false
showanswer = false
showsolution = false
tries = 0
countCorrect = 0
showhint = false
InputBox1 = Textfield(input1)
InputBox2 = Textfield(input2)
correct2: input1 ≟ b_{1}
correct1: elementsOrdered(1) / elementsOrdered(2) ≟ elementsOrdered(3) / elementsOrdered(4)
correct: correct1 ∧ correct2
showbuttons = true
typicalError1: 0
typicalError2: 0
showhinttypicalerror = false
enableBtnValidate: inputCurrent ≠ inputSaved ∧ inputCurrent ≟ RemoveUndefined[inputCurrent]
pixelsRight: 16
pixelsLeft: 16
pixelsBottom: 16
pixelsTop: 24
layoutY: 448
enableInput: tries < 3 ∧ (¬(validate ∧ correct))
layoutX: 194
layoutAppSize = Corner(5)
onboarding = true
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)
displayAngle = sectorPixels(A, B, C, 40, Corner[1], Corner[3], Corner[5])
layoutOnboarding = PointToPixels(Corner[onboardingDisplayText, 2], Corner[1], Corner[3], Corner[5])
onboardingX = 537
onboardingY: 220
onboardingCase = 3
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
dropCount1_{1} = 0
d_{1} = 4 (slider from 0 to 4)
color_{1} = Element(randomColor_{1}, Mod[countQuestion_{1}, Length[randomColor_{1}]] + 1)
MoveGuideLine_{1} = (-2.6929396562500023, 2.1920930343116813)
hGuideline_{1}: y = y(MoveGuideLine_{1})
vGuideline_{1}: x = x(MoveGuideLine_{1})
glass1Base_{1}: x^(2) + (8 * y^(2)) = 1
glass1Top_{1}: (x^(2) + (8 * (y - 4.5)^(2))) / (((sqrt(2) - 1) / 4 * 4.5) + 1)^(2) = 1
glass1Left_{1} = Segment(Vertex[glass1Base_{1}], Vertex[glass1Top_{1}])
h1_{1}: X_{1} / 4
liquidheight1_{1}: (x^(2) + (8 * (y - h1_{1})^(2))) / (((sqrt(2) - 1) / 4 * h1_{1}) + 1)^(2) = 1
displacement_{1}: (d_{1}, 0)
h2_{1}: Y_{1} / 4
liquidheight2_{1}: (x^(2) + (8 * (y - h2_{1})^(2))) / (((sqrt(2) - 1) / 4 * h2_{1}) + 1)^(2) = 1
glass2left_{1} = Translate(glass1Left_{1}, displacement_{1})
glassBase2_{1} = Translate(glass1Base_{1}, displacement_{1})
glassTop2_{1} = Translate(glass1Top_{1}, displacement_{1})
liquidheight2InPlace_{1} = Translate(liquidheight2_{1}, displacement_{1})
dropCount2_{1} = 0
anim1 = 0 (slider from 0 to 1)
red_{1}: Element[{230, 228, 133, 89, 0, 224}, color_{1}] / 255
green_{1}: Element[{107, 68, 117, 145, 168, 116}, color_{1}] / 255
blue_{1}: Element[{158, 97, 255, 255, 60, 21}, color_{1}] / 255
ratio1_{1}: "" + (LaTeX[dropCount1_{1}]) + ":" + (LaTeX[X_{1}]) + ""
ratio2_{1}: "" + (LaTeX[dropCount2_{1}]) + ":" + (LaTeX[Y_{1}]) + ""
c_{1}(x, y) = (-sqrt((1 - x^(2)) / 8)) ≤ y ≤ 0
d_{2}(x, y) = h1_{1} ≤ y ≤ sqrt(((((sqrt(2) - 1) / 4 * h1_{1}) + 1)^(2) - x^(2)) / 8) + h1_{1}
c'_{1} = Translate(c_{1}, displacement_{1})
e_{1}(x, y) = h2_{1} ≤ y ≤ sqrt(((((sqrt(2) - 1) / 4 * h2_{1}) + 1)^(2) - x^(2)) / 8) + h2_{1}
e'_{1} = Translate(e_{1}, displacement_{1})
smaller_{1} = Min(X_{1}, Y_{1})
Drop1_{1}: (If[dropCount1_{1} ≟ a_{1}, 4, 0], 6 - (anim1 * (6 - If[dropCount1_{1} ≟ a_{1}, h2_{1}, h1_{1}])))
opacity_{1}: 1
opacity1_{1}: ((dropCount1_{1} / X_{1} * Y_{1} / 20) * opacity_{1})
opacity2_{1}: (dropCount2_{1} / 20 * opacity_{1})
q3_{1} = Polygon({(1, -1.5), (2, -1.5), (2, -0.5), (1, -0.5)})
q4_{1} = Polygon({(2, -1.5), (2, -0.5), (3, -0.5), (3, -1.5)})
q5_{1} = Polygon({(1, -1.5), (1, -0.5), (3, -0.5), (3, -1.5)})
add_{1} = 0 (slider from 0 to 20, step 1)
timer_{1} = 4 (slider from 0 to 4, step 0.1)
speedTimer_{1}: 3
speed_{1}: 15
glass1Right = Mirror(glass1Left_{1}, yAxis)
glass2Right = Translate(glass1Right, displacement_{1})
D, E = Intersect(liquidheight1_{1}, Line[(0, h1_{1}), (1, h1_{1})])
F, G = Intersect(liquidheight2InPlace_{1}, Line[(0, h2_{1}), (1, h2_{1})])
q1 = Polygon({(1, 0), (-1, 0), D, E})
q2 = Polygon({(5, 0), (3, 0), G, F})
Cor1 = (-11.664449999999997, -3.8889849459199994)
Cor3 = (7.272774999999996, 9.216786563200003)
textBox1 = Text(("\hspace{5}" * X_{1}), Midpoint[Cor1Box1, Cor3Box1], true, true, 0, 0)
Cor2Box2: Cor1Box2 + (boxWid, 0)
Cor3Box2: Cor1Box2 + (boxWid, boxHei)
Cor4Box2: Cor1Box2 + (0, boxHei)
box2, n, p, q, r = Polygon(Cor1Box2, Cor2Box2, Cor3Box2, Cor4Box2)
textBox2 = Text(("\hspace{5}" * a_{1}), Midpoint[Cor1Box2, Cor3Box2], true, true, 0, 0)
Cor2Box3: Cor1Box3 + (boxWid, 0)
Cor3Box3: Cor1Box3 + (boxWid, boxHei)
Cor4Box3: Cor1Box3 + (0, boxHei)
Cor2Box4: Cor1Box4 + (boxWid, 0)
Cor3Box4: Cor1Box4 + (boxWid, boxHei)
Cor4Box4: Cor1Box4 + (0, boxHei)
box3, j, k, l, m = Polygon(Cor1Box3, Cor2Box3, Cor3Box3, Cor4Box3)
box4, s, t, a, b = Polygon(Cor1Box4, Cor2Box4, Cor3Box4, Cor4Box4)
textBox3 = Text(("\hspace{5}" * Y_{1}), Midpoint[Cor1Box3, Cor3Box3], true, true, 0, 0)
HomePos1: (-2.26343, 4.55)
HomePositions = Sequence(HomePos1 + ((2 * ii), 0), ii, 0, 3)
HomePositionsOrdered = Sort(HomePositions, If[countQuestion ≟ 0, Sequence[4], Append[randomOrder, randomNum1]])
box1InMovement: ¬Defined[IndexOf[true, Zip[Cor1Box1 ≟ PP, PP, {HomePositionsOrdered(1), DropArea1Corner, DropArea2Corner, DropArea3Corner, DropArea4Corner}]]]
box2InMovement: ¬Defined[IndexOf[true, Zip[Cor1Box2 ≟ PP, PP, {HomePositionsOrdered(2), DropArea1Corner, DropArea2Corner, DropArea3Corner, DropArea4Corner}]]]
box3InMovement: ¬Defined[IndexOf[true, Zip[Cor1Box3 ≟ PP, PP, {HomePositionsOrdered(3), DropArea1Corner, DropArea2Corner, DropArea3Corner, DropArea4Corner}]]]
box4InMovement: ¬Defined[IndexOf[true, Zip[Cor1Box4 ≟ PP, PP, {HomePositionsOrdered(4), DropArea1Corner, DropArea2Corner, DropArea3Corner, DropArea4Corner}]]]
box1Regions = Zip(If[Distance[Centroid[box1], Centroid[PP]] ≤ distLimit, Distance[Centroid[box1], Centroid[PP]], 100], PP, allAreas)
H = Centroid(dropArea1)
box2Regions = Zip(If[Distance[Centroid[box2], Centroid[PP]] ≤ distLimit, Distance[Centroid[box2], Centroid[PP]], 100], PP, allAreas)
box3Regions = Zip(If[Distance[Centroid[box3], Centroid[PP]] ≤ distLimit, Distance[Centroid[box3], Centroid[PP]], 100], PP, allAreas)
box4Regions = Zip(If[Distance[Centroid[box4], Centroid[PP]] ≤ distLimit, Distance[Centroid[box4], Centroid[PP]], 100], PP, allAreas)
box1To = If(Min[Zip[Element[box1Regions, nn], nn, Sequence[4] \ {box2In, box3In, box4In}]] ≟ 100, 5, IndexOf[Min[Zip[Element[box1Regions, nn], nn, Sequence[4] \ {box2In, box3In, box4In}]], box1Regions])
box2To = If(Min[Zip[Element[box2Regions, nn], nn, Sequence[4] \ {box1In, box3In, box4In}]] ≟ 100, 5, IndexOf[Min[Zip[Element[box2Regions, nn], nn, Sequence[4] \ {box1In, box3In, box4In}]], box2Regions])
box4To = If(Min[Zip[Element[box4Regions, nn], nn, Sequence[4] \ {box1In, box2In, box3In}]] ≟ 100, 5, IndexOf[Min[Zip[Element[box4Regions, nn], nn, Sequence[4] \ {box1In, box2In, box3In}]], box4Regions])
showIB: Sort[{box1In, box2In, box3In, box4In}] ≟ Sequence[4]
box3To = If(Min[Zip[Element[box3Regions, nn], nn, Sequence[4] \ {box1In, box2In, box4In}]] ≟ 100, 5, IndexOf[Min[Zip[Element[box3Regions, nn], nn, Sequence[4] \ {box1In, box2In, box4In}]], box3Regions])
activeBox = Element({box1To, box2To, box3To, box4To}, IndexOf[true, {box1InMovement, box2InMovement, box3InMovement, box4InMovement}])
isTypicalError: ¬correct1
text2 = If(endDropping < b_{1}, "\textsf{Demasiado suave...}", endDropping > b_{1}, "\textsf{Demasiado intenso...}", "\textsf{¡Coinciden!}")
text4 = Text(text2, (2.1, -1.9), true, true, 0, 0)
c = Translate(hGuideline_{1}, Vector[(Vector[Corner[4], Corner[1]] / 500 * 24)])
text3 = If(correct1, "✓", "✘")
text5 = If(correct2, "✓", "✘")
onboardingTextWidth: (x(Corner[onboardingText, 2] - Corner[onboardingText, 1]) * 800 / x(Corner[2] - Corner[1]))
onboardingTextHeight: (y(Corner[onboardingText, 4] - Corner[onboardingText, 1]) * 500 / y(Corner[4] - Corner[1]))
I = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
pulsingObject1 = expandQuad(Cor1Box1, Cor2Box1, Cor3Box1, Cor4Box1, (7 * pulsing), Corner[1], Corner[3], Corner[5])
pulsingObject2 = expandQuad(Cor1Box2, Cor2Box2, Cor3Box2, Cor4Box2, (7 * pulsing), Corner[1], Corner[3], Corner[5])
pulsingObject3 = expandQuad(Cor1Box3, Cor2Box3, Cor3Box3, Cor4Box3, (7 * pulsing), Corner[1], Corner[3], Corner[5])
pulsingObject4 = expandQuad(Cor1Box4, Cor2Box4, Cor3Box4, Cor4Box4, (7 * pulsing), Corner[1], Corner[3], Corner[5])
labelBtnValidate: "\text{CHEQUEAR (" + (LaTeX[3 - tries]) + ")}"
textHint: "\text{\color{" + (LaTeX[colorOrange]) + "}\bold{Pista}\\" + (LaTeX[If[showhinttypicalerror, helpTextHintTypicalError]]) + "" + (LaTeX[If[showhint ∧ showhinttypicalerror, "\\"]]) + "" + (LaTeX[If[showhint, helpTextHint]]) + "}"
textFeedback: "" + (LaTeX[If[correct, "$\text{✓ Correcto}$", "$\text{✕ " + (If[tries < 3, "Reinténtalo", "Quizás la próxima vez"]) + "}$"]]) + ""
textCountCorrect: "\text{Correctos: " + (LaTeX[countCorrect]) + " }"
textQuestion: "\textsf{El vaso A contiene }" + (LaTeX[X_{1}]) + "\textsf{ onzas de agua con }" + (LaTeX[a_{1}]) + "\textsf{ gotas de colorante. El vaso B contiene }" + (LaTeX[Y_{1}]) + "\textsf{ onzas}\\
\textsf{de agua. Arrastra las piezas para expresar la proporción y luego halla cuántas gotas de }\\
\textsf{colorante deben agregarse al vaso B para que resulte el mismo color que en el vaso A.}"
text1_{1}: "\frac{" + (LaTeX[a_{1}]) + "\text{ gotas}}{" + (LaTeX[X_{1}]) + "\text{ onzas}}\hspace{40}" + (LaTeX[If[timer_{1} ≥ 2, "", "\textcolor{white}"]]) + "{=}\hspace{40}" + (LaTeX[If[timer_{1} ≥ 3, "", "\textcolor{white}"]]) + "\frac{" + (LaTeX[b_{1}]) + "\text{ gotas}}{" + (LaTeX[Y_{1}]) + "\text{ onzas}}"
textSolution: "\textsf{\bold{Posible solución}}\\
\textsf{Vaso A: La razón de gotas a onzas es }\frac{" + (LaTeX[a_{1}]) + "}{" + (LaTeX[X_{1}]) + "}.\\
\textsf{Vaso B: La razón de gotas a onzas es }\frac{d}{" + (LaTeX[Y_{1}]) + "}.\\
\textsf{Las razones serán iguales si }g=" + (LaTeX[b_{1}]) + "\\"
textBox4 = Text("\hspace{5}g", Midpoint[Cor1Box4, Cor3Box4], 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: 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)