#4D4D4D

$\text{Check}$

$\text{NUEVO}$

Fix position and allow selection for all text objects

Reset app

\textsf{Write the answer in terms of }x\textsf{ and }y.

#006758

#B00020

#252525

#757575

#949494

#E44461

#DA2570

#E66B9E

#3A6ED6

#5991FF

#008475

#0F8538

#00a83c

#5145A8

#6557D2

#8575FF

#903D14

#BD6C43

#C75000

#E07415

#eeeeee

#2E006758

#2EB00020

\text{\hspace{10px}Clic para ver\las coordenadas}

btnNext

A

A'

\text{You can draw your thoughts on the grid.\Your sketch is just for you and will not be\graded.}

\text{Drag to position}

textSol1

\text{\hspace{10px}Click to start\or end sketching}

x

y

\bgcolor{white}{(x, y)}

\textsf{Selecciona las coordenadas del punto que}\
\textsf{es imagen de }(x, y)\textsf{ en la simetría.}\

\textsf{

allRandomSeeds = RandomUniform(0, 0.99, 200)
animationSlider = 0 (slider from 0 to 1, step 0.01)
animationEase(x) = If[x ≤ 0.5, (1 / 2 * ((2 * x))^(5)), (1 / 2 * ((2 * x) - 2)^(5)) + 1]
countQuestion = 0
numRandoms: 15
randIndex: (Mod[countQuestion, floor(Length[allRandomSeeds] / numRandoms)] * numRandoms) + 1
currentRandomSeeds = Take(allRandomSeeds, randIndex, randIndex + numRandoms - 1)
randomQuadrant: 1 + floor((currentRandomSeeds(1) * 4))
PointStarts: {(1 + floor((currentRandomSeeds(4) * 2)), 1 + floor((currentRandomSeeds(5) * 2))), (3 + floor((currentRandomSeeds(6) * 2)), 1 + floor((currentRandomSeeds(7) * 2))), (2 + floor((currentRandomSeeds(8) * 2)), 3 + floor((currentRandomSeeds(9) * 2)))}
minXTrans = Max(x(PointStarts))
xMove: minXTrans + floor((currentRandomSeeds(10) * Min[3, 5 - minXTrans]))
minYTrans = Max(y(PointStarts))
yMove: minYTrans + floor((currentRandomSeeds(11) * Min[3, 5 - minYTrans]))
transStarts: {(0, 0), ((-xMove), 0), ((-xMove), (-yMove)), (0, (-yMove))}
transVector = Vector(transStarts(randomQuadrant))
PointsTriangle = Translate(PointStarts, transVector)
transformPoints: {Mirror[PointsTriangle, y = 0], Mirror[PointsTriangle, x = 0], Mirror[Mirror[PointsTriangle, x = 0], y = 0], PointsTriangle}
AnimationEnd1: transformPoints(1)
AnimationEnd2: transformPoints(3)
transformSpec = If(countQuestion ≟ 0, 2, 1 + floor((currentRandomSeeds(2) * 3)))
inputCoords: {"$-\textsf{ Selecciona uno }-$", "$\[(x,-y)\]$", "$\[(-x,y)\]$", "$\[(-x,-y)\]$", "$\textsf{No hay simetría}$"}
inputTransform: Mod[SelectedIndex[inputCoords] - 2, 5] + 1
correct: inputTransform ≟ transformSpec
tries = 0
animationChoice = If(correct ∨ tries ≟ 3, transformSpec, inputTransform)
hintPointChoice: transformPoints(animationChoice)
animationVal = If(animationChoice < 3, animationSlider, animationChoice ≟ 3, (2 * animationSlider), 0)
animation2EaseVal = If(animationVal > 1, animationEase(animationVal - 1), 0)
AnimationPoints2 = Zip(PartitionPoint[a, b, animation2EaseVal, 1], a, AnimationEnd1, b, AnimationEnd2)
animationEaseVal = If(animationVal ≤ 1, animationEase(animationVal), 1)
AnimationPointsSingle = Zip(PartitionPoint[a, b, animationEaseVal, 1], a, PointsTriangle, b, hintPointChoice)
AnimationPoints1 = Zip(PartitionPoint[a, b, animationEaseVal, 1], a, PointsTriangle, b, AnimationEnd1)
AnimationPointsDouble = If(animationVal ≤ 1, AnimationPoints1, AnimationPoints2)
AnimationAll = If(animationChoice < 3, AnimationPointsSingle, animationChoice ≟ 3, AnimationPointsDouble, PointsTriangle)
transPointChoice: transformPoints(transformSpec)
showhint1 = false
yDirection = If(randomQuadrant ≟ 1 ∨ randomQuadrant ≟ 2, -1, 1)
xDirection = If(randomQuadrant ≟ 1 ∨ randomQuadrant ≟ 4, -1, 1)
viewbox = Polygon({(-5.2, -5.2), (-5.2, 5.2), (5.2, 5.2), (5.3, -5.2)})
PointPulseMax = KeepIf(y(n) ≟ Max[y(PointsTriangle)], n, PointsTriangle)
PointPulseMin = KeepIf(y(n) ≟ Min[y(PointsTriangle)], n, PointsTriangle)
PointPulse = If(randomQuadrant ≟ 1 ∨ randomQuadrant ≟ 2, PointPulseMin(1), PointPulseMax(1))
PointSize = (14.121391601513656, -9.320630591336128)
quadrants: {Polygon[{(0, 0), (4, 0), (4, 5), (0, 5)}], Polygon[{(0, 0), (-5, 0), (-5, 5), (0, 5)}], Polygon[{(0, 0), (-5, 0), (-5, -4.5), (0, -4.5)}], Polygon[{(0, 0), (4, 0), (4, -4.5), (0, -4.5)}]}
sizeP1: "" + (LaTeX[PointsTriangle(1)]) + ""
sizeP2: "" + (LaTeX[PointsTriangle(2)]) + ""
sizeP3: "" + (LaTeX[PointsTriangle(3)]) + ""
tri = Polygon(PointsTriangle)
TriLabel = Centroid(tri)
CenterLabels = Zip(UnitVector[Vector[TriLabel, n]] + n, n, PointsTriangle)
transform = Polygon(transPointChoice)
PointsTransform: {Vertex[transform]}
sizeP1': "" + (LaTeX[PointsTransform(1)]) + ""
sizeP2': "" + (LaTeX[PointsTransform(2)]) + ""
sizeP3': "" + (LaTeX[PointsTransform(3)]) + ""
dimPoints: {{Corner[sizeP1, 2] - Corner[sizeP1, 4], Corner[sizeP1, 4] - PointSize}, {Corner[sizeP2, 2] - Corner[sizeP2, 4], Corner[sizeP2, 4] - PointSize}, {Corner[sizeP3, 2] - Corner[sizeP3, 4], Corner[sizeP3, 4] - PointSize}, {Corner[sizeP1', 2] - Corner[sizeP1', 4], Corner[sizeP1', 4] - PointSize}, {Corner[sizeP2', 2] - Corner[sizeP2', 4], Corner[sizeP2', 4] - PointSize}, {Corner[sizeP3', 2] - Corner[sizeP3', 4], Corner[sizeP3', 4] - PointSize}}
maxX: Max[Sequence[x(dimPoints(n, 1)), n, 1, 6]] + 0.4
maxY: Max[Sequence[y(dimPoints(n, 1)), n, 1, 6]] + 0.4
shape1 = ConvexHull(Flatten[{PointsTriangle, PointsTriangle + (0, maxY), PointsTriangle + ((-maxX), 0)}])
area1 = Polygon(First[shape1, Length[shape1]])
shape2 = ConvexHull(Flatten[{PointsTransform, PointsTransform + (0, maxY), PointsTransform + ((-maxX), 0)}])
area2 = Polygon(First[shape2, Length[shape2]])
preventOverlap = KeepIf((¬IsInRegion[k, area1]) ∧ (¬IsInRegion[k, area2]), k, Flatten[Sequence[Sequence[(n / 5, m / 5), n, -25, 18], m, -22, 25]])
preventOverlapS = KeepIf(IsInRegion[k, quadrants(randomQuadrant)], k, preventOverlap)
TriLabel' = Centroid(transform)
solutionQuadrant = If(x(TriLabel') < 0, If[y(TriLabel') < 0, 3, 2], If[y(TriLabel') < 0, 4, 1])
CenterSolutions = Zip(UnitVector[Vector[TriLabel', n]] + n, n, transPointChoice)
StartTextPoints = Zip(m - dimPoints(d, 1), m, Flatten[{CenterLabels, CenterSolutions}], d, Sequence[6])
PointsNew = Zip(ClosestPoint[preventOverlapS, n], n, First[StartTextPoints, 3])
boxAreas = Zip(makeBox[m + Element[dimPoints, d, 2] - Element[dimPoints, d, 1], (2 * x(Element[dimPoints, d, 1])), abs((2 * y(Element[dimPoints, d, 1])))], m, First[PointsNew, 3], d, {1, 2, 3})
inputSaved: {NaN}
inputCurrent: {inputTransform}
validate = false
showanswer = false
showsolution = false
countCorrect = 0
showhint = false
showbuttons = true
showhinttypicalerror = false
helpTextHint: "\textsf{¿Con qué criterio se transforma un par\\de coordenadas en su correspondiente?}\\" + (LaTeX[PointsTriangle(1)]) + "→" + (LaTeX[transPointChoice(1)]) + "\\" + (LaTeX[PointsTriangle(2)]) + "→" + (LaTeX[transPointChoice(2)]) + "\\" + (LaTeX[PointsTriangle(3)]) + "→" + (LaTeX[transPointChoice(3)]) + ""
pixelsRight: 16
pixelsLeft: 16
pixelsBottom: 16 + 36 + 24 + 16 + 8
pixelsTop: 24 + 16 + 8
layoutY: 152
layoutX: 444
onboarding = true
pulsingSpeed: 8
onboardingCase = If(randomQuadrant ≟ 1 ∨ randomQuadrant ≟ 2, 3, 4)
xMin: -5.73
xMax: 15.83
yMax: 6.4
yMin: yMax - ((xMax - xMin) * 5 / 8)
PointOnboarding = PointToPixels((xMin, yMin), (xMax, yMax), (800, 500), PointPulse)
onboardingX: x(PointOnboarding) - 12
onboardingY: y(PointOnboarding) + If[onboardingCase ≟ 3, 24 + 24, -24]
OnboardingTextOffset = onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], onboardingCase, Corner[1], Corner[3], Corner[5])
axisX = Segment((x(Vertex[viewbox, 1]), 0), (x(Vertex[viewbox, 3]), 0))
axisY = Segment((0, y(Vertex[viewbox, 1])), (0, y(Vertex[viewbox, 3])))
textTransforms: {"translated", "rotated", "reflected"}
aDims: {Corner[textASize, 2] - Corner[textASize, 4], PointSize - Corner[textASize, 4]}
textA: "" + (LaTeX[textASize]) + ""
inputX: 436
inputY: layoutY - 72
speed: 4
animateTransform = Polygon(AnimationAll)
aDims': {Corner[textASize', 2] - Corner[textASize', 4], PointSize - Corner[textASize', 4]}
PointLabel': TriLabel' + (((-aDims'(1))) / 2, aDims'(2) / 2) + aDims'(3)
textA': "" + (LaTeX[textASize']) + ""
textPoints: {sizeP1, sizeP2, sizeP3, sizeP1', sizeP2', sizeP3'}
transformHint = Polygon(AnimationAll)
textDisplayPoint = Zip(Text["\bgcolor{white}{" + (n) + "}", m, true, true], n, First[textPoints, 3], m, First[PointsNew, 3], d, {1, 2, 3})
preventOverlapF = KeepIf((¬IsInRegion[n, boxAreas(1)]) ∧ (¬IsInRegion[n, boxAreas(2)]) ∧ (¬IsInRegion[n, boxAreas(3)]) ∧ IsInRegion[n, quadrants(solutionQuadrant)], n, preventOverlap)
PointsNew2 = Zip(ClosestPoint[preventOverlapF, n], n, Last[StartTextPoints, 3])
bottomCorner = PointToPixels(Corner[1], Corner[3], Corner[5], (5.3, -5.2))
xCorner: x(bottomCorner)
yCorner: y(bottomCorner)
textDisplay1 = Text("\bgcolor{white}{" + (textPoints(1)) + "}", PointsNew(1), true, true)
textDisplay2 = Text("\bgcolor{white}{" + (textPoints(2)) + "}", PointsNew(2), true, true)
textDisplay3 = Text("\bgcolor{white}{" + (textPoints(3)) + "}", PointsNew(3), true, true)
showPoints: {false, false, false}
Point1: PointsTriangle(1)
Point2: PointsTriangle(2)
Point3: PointsTriangle(3)
onboardingDisplayText: "\bgcolor{white}{" + (LaTeX[onboardingText]) + "}"
onboardingTextY: onboardingY + y(OnboardingTextOffset) + If[onboardingCase ≟ 3, -32, -24]
onboardingTextX: onboardingX + x(OnboardingTextOffset)
pulsing = 0.02 (slider from 0 to 1, step 0.01)
haloPixels: (pulsing * 7)
pulsingObject = circlePixels(PointPulse, 5 + (5 * pulsing), Corner[1], Corner[3], Corner[5])
showDialog = false
polyLines: {}
xyArea = KeepIf((¬IsInRegion[n, boxAreas(1)]) ∧ (¬IsInRegion[n, boxAreas(2)]) ∧ (¬IsInRegion[n, boxAreas(3)]), n, preventOverlapS)
XYPoint = ClosestPoint(xyArea, TriLabel)
Point1': transPointChoice(1)
Point2': transPointChoice(2)
Point3': transPointChoice(3)
whichAxis = If(transformSpec ≟ 2, "y", "x")
whichSign = If(transformSpec ≟ 2, "x", "y")
textSol1: "
 " + (LaTeX[AnimationEnd1(1)]) + "," + (LaTeX[AnimationEnd1(2)]) + "\textsf{, and }" + (LaTeX[AnimationEnd1(3)]) + ".\\
\textsf{Change the sign of }x \textsf{ to reflect over the }\\ y\textsf{-axis}\\" + (LaTeX[AnimationEnd1(1)]) + ", " + (LaTeX[AnimationEnd1(2)]) + "\textsf{, and }" + (LaTeX[AnimationEnd1(3)]) + "\textsf{ maps to}\\"
isTypicalError: false
enableBtnValidate: inputCurrent ≠ inputSaved ∧ inputTransform ≠ 5
enableInput: tries < 3 ∧ (¬(validate ∧ correct)) ∧ Mod[animationVal, 1] ≟ 0
textCountCorrect: "\text{Correctos al primer intento: " + (LaTeX[countCorrect]) + " }"
labelBtnValidate: "\text{CHEQUEAR (" + (LaTeX[3 - tries]) + ")}"
textHint: "\textsf{\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"]) + "}$"]]) + ""
textSolution: "\textsf{\bold{Posible solución}}\\
\textsf{Cambia el signo de }" + (LaTeX[whichSign]) + "\textsf{ para simetrizar con }\\\textsf{con respecto al eje }" + (LaTeX[whichAxis]) + ".\\
 " + (LaTeX[PointsTriangle(1)]) + " ,  " + (LaTeX[PointsTriangle(2)]) + "\textsf{ y }" + (LaTeX[PointsTriangle(3)]) + " \\\textsf{se transforman en}\\" + (LaTeX[If[transformSpec < 3, "", textSol1 + ""]]) + "" + (LaTeX[transPointChoice(1)]) + ", " + (LaTeX[transPointChoice(2)]) + "\textsf{ y }" + (LaTeX[transPointChoice(3)]) + "\\\textsf{respectivamente}."
PointLabel: TriLabel - aDims(1) + aDims(2)
layoutAppSize: (800, 500)
textDisplay1' = Text("\bgcolor{white}{" + (textPoints(4)) + "}", PointsNew2(1) - Element[dimPoints, 4, 2], true, true)
textDisplay2' = Text("\bgcolor{white}{" + (textPoints(5)) + "}", PointsNew2(2) - Element[dimPoints, 5, 2], true, true)
textDisplay3' = Text("\bgcolor{white}{" + (textPoints(6)) + "}", PointsNew2(3) - Element[dimPoints, 6, 2], true, true)
textDisplayPointSol = Zip(Text["\bgcolor{white}{" + (n) + "}", m - Element[dimPoints, d, 2], true, true], n, Last[textPoints, 3], m, PointsNew2, d, {4, 5, 6})

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: expandTriangle
expandTriangle(A,B,C,pixelGap,Corner1,Corner3,Corner5)
Input: A, B, C, 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}
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: 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: PartitionPoint
PartitionPoint(P1,P2,Num,Den)
Input: SimMove, solutionPoint, animation1Slider, animation1Range
Output: Animation1Point

$\textbf{\mathsf{F}}$

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

Tool: getLabelPos (command getLabelPos5)
getLabelPos5(A,B,C,D,E,gap,xyScale)
Input: A, B, C, D, E, gap, xyScale
Output: allPoints

allVerts: {A, B, C, D, E}
allAngles = Zip(Angle[B + (1, 0), B, A] + (0.5 * Angle[A, B, C]), A, Append[allVerts(-1), allVerts], B, allVerts, C, Append[Take[allVerts, 2], allVerts(1)])
xyScale: 3
gap: 0.5
allPoints = Zip((x(A) + (gap * cos(B)), y(A) + ((gap * xyScale) * sin(B))), A, allVerts, B, allAngles)

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

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) * (yTop - y(InputPoint)) / (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: 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)