Visualizing Algebraic Equations Using a Balance Beam

Visualizing Algebraic Equations Using a Balance Beam
Loading the math board and drawing, please wait…
2023-02-04 06:20
This example demonstrates how to model algebraic equations using a balance beam to understand the connection between the model and solution steps. Key math concepts include solving two-step linear equations and inequalities, and graphing inequality solutions on a number line. Construction involves GeoGebra commands such as Shuffle, Element, If, PointToPixels, etc., to create dynamic balance models. Suitable for middle school students (grades 6-8) to grasp equation-solving processes and geometric intuition.

GeoGebra Commands & Parameters

  1. Shuffle(Sequence[2, 15]) → randomXVal, {12, 10, 4, 2, 8, 5, 3, 15, 6, 13, 7, 14, 9, 11}
  2. Element(randomXVal, Mod[countQuestion, Length[randomXVal]] + 1) → xVal
  3. If(diffStudent ≤ -10, ((-pi)) / 10, If[diffStudent > 10, pi / 10, (diffStudent / 10 * pi / 10)]) → rotationAngle
  4. PointToPixels(Corner[1], Corner[3], Corner[5], CenterP) → CenterPixels
  5. PixelsToPoint(Corner[1], Corner[3], Corner[5], CenterPixels + (-270, 0)) → MidLeft
  6. Rotate(MidLeft, rotationAngle, CenterP) → LeftRotate
  7. PointToPixels(Corner[1], Corner[3], Corner[5], LeftRotate) → PixelLeft
  8. PixelsToPoint(Corner[1], Corner[3], Corner[5], PixelLeft + (-90, -51.5)) → StartLeft
  9. RemoveUndefined(Flatten[Sequence[Sequence[If[i + (5 * j) < studentUnitsLeft, StartLeft + (x(LeftRotate) - x(StartLeft), 0) + ((unitWidth * i), (unitWidth * j))], i, 0, 4], j, 0, 10]]) → pointsLeft
  10. PixelsToPoint(Corner[1], Corner[3], Corner[5], CenterPixels + (270, 0)) → MidRight
  11. Rotate(MidRight, rotationAngle, CenterP) → RightRotate
  12. PointToPixels(Corner[1], Corner[3], Corner[5], RightRotate) → PixelRight
  13. PixelsToPoint(Corner[1], Corner[3], Corner[5], PixelRight + (-90, -51.5)) → StartRight
  14. Flatten(Sequence[Sequence[StartLeft + ((i * widthX), (j * widthX)), i, 0, 2], j, 0, 1]) → possiblePointsLeftX
  15. Shuffle(Sequence[2, 6]) → randomNumX, {5, 4, 2, 3, 6}
  16. Element(randomNumX, Mod[countQuestion, Length[randomNumX]] + 1) → numX
  17. Sequence(StartLeftStage2 + ((A * (1.2 * widthX)), 0), A, 0, numX - 1) → pointsXDestination
  18. If(animateStep2 < 2, 0, If[animateStep2 > 3, 1, animateStep2 - 2]) → animate2B
  19. Zip(Translate[A, (animate2B * (B - A))], A, possiblePointsLeftX, B, pointsXDestination) → pointsXMove
  20. If(animateStep2 < 3, 0, If[animateStep2 > 4, 1, animateStep2 - 3]) → animate2C
  21. Shuffle(Sequence[1, 15]) → randomUnitsLeft, {11, 12, 14, 9, 8, 4, 5, 2, 6, 15, 13, 10, 1, 3, 7}
  22. Element(randomUnitsLeft, Mod[countQuestion, Length[randomUnitsLeft]] + 1) → expectedUnitsLeft
  23. Sequence(StartRightStage2 + (0, A), A, 0, xVal - 1) → pointsFinalRight
  24. Flatten(Sequence[Sequence[StartRightStage2 + ((i * unitWidth), (j * unitWidth)), i, 0, numX - 1], j, 0, xVal - 1]) → pointsRightStage2
  25. Zip(A + (((x(A) - x(StartRightStage2)) / unitWidth * 0.5), 0), A, pointsRightStage2) → pointsRightStage3
  26. Flatten(Sequence[Sequence[StartRightStage2 + ((i * unitWidth), (j * unitWidth)), i, 0, 9], j, 0, 10]) → possiblePointsRight
  27. RemoveUndefined(Flatten[Sequence[Sequence[If[i + (10 * j) < studentUnitsRight, StartRight + ((unitWidth * i), (unitWidth * j))], i, 0, 9], j, 0, 10]]) → pointsRight
  28. Take(pointsRight, (numX * xVal) + 1) → pointsRightSubtracted
  29. Remove(pointsRight, pointsRightSubtracted) → pointsRightAfterSubtraction
  30. RemoveUndefined(Zip[If[x(A) ≥ x(StartRightStage2) + (unitWidth * numX), A], A, pointsRightAfterSubtraction]) → pointsRightToMove
  31. Remove(pointsRightAfterSubtraction, pointsRightToMove) → pointsStationary
  32. If(animateStep2 < 1, 0, If[animateStep2 > 2, 1, animateStep2 - 1]) → animate2A
  33. Zip(Translate[A, (animate2B * (B - A))], A, pointsRightStage2, B, pointsRightStage3) → pointsMoveStage2
  34. 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)}]) → borderBox
  35. Corner(5) → layoutAppSize
  36. Rotate(CenterP + (armRadius, 0), rotationAngle, CenterP) → RightArmEnd
  37. If(correct, {0, 103 / 255, 88 / 255}, {37 / 255, 37 / 255, 37 / 255}) → colorEqn
  38. If(animate2A ≤ 0.5, {230 / 255, 107 / 255, 158 / 255}, If[0.5 < animate2A < 1, {199 / 255, 80 / 255, 0}, {230 / 255, 107 / 255, 158 / 255}]) → colorStage2
  39. Sequence(Sequence[If[i + (3 * j) < studentX, boxTool[widthX, widthX, StartLeft + ((widthX * i), (widthX * j))]], i, 0, 2], j, 0, 1) → boxesStudentX
  40. Take(pointsRightStage2, Length[pointsRightStage2] - Length[pointsRightToMove] + 1) → pointsRightMoveDestinations
  41. Zip(boxTool[unitWidth, unitWidth, A], A, pointsRightSubtracted) → fadingBoxes1
  42. Zip(Translate[boxTool[unitWidth, unitWidth, A], (animate2A * (B - A))], A, pointsRightToMove, B, pointsRightMoveDestinations) → moveBoxes
  43. Zip(Translate[boxTool[unitWidth, unitWidth, A], (animate2B * (B - A))], A, pointsRightStage2, B, pointsRightStage3) → moveBoxes2
  44. If(animateStep1 ≟ 0, pointsRight, If[animate2A ≟ 0, pointsRightAfterSubtraction, If[animate2B ≟ 0, pointsStationary, If[animate2C ≟ 0, pointsMoveStage2, pointsFinalRight]]]) → currentPointsRight
  45. Zip(boxTool[unitWidth, unitWidth, A], A, currentPointsRight) → boxesRightSolution
  46. Remove(pointsMoveStage2, pointsFinalRight) → pointsToFade2
  47. Zip(boxTool[unitWidth, unitWidth, A], A, pointsToFade2) → fadingBoxes2
  48. Remove(pointsXMove, {StartLeftStage2}) → pointsToFadeX
  49. Zip(boxTool[widthX, widthX, A], A, pointsToFadeX) → fadingBoxesX
  50. Zip(boxTool[widthX, widthX, A], A, If[animate2C ≟ 0, pointsXMove, {StartLeftStage2}]) → boxesXSoln
  51. Flatten(Sequence[Sequence[If[i + (5 * j) < expectedUnitsLeft, StartLeft + ((5.5 * unitWidth), 0) + ((i * unitWidth), (j * unitWidth))], i, 0, 4], j, 0, 2]) → pointsLeftUnits
  52. Zip(boxTool[unitWidth, unitWidth, A], A, pointsLeftUnits) → fadingBoxesLeft
  53. Zip(boxTool[unitWidth, unitWidth, A], A, pointsLeft) → boxesStudentLeft
  54. Zip(boxTool[unitWidth, unitWidth, A], A, pointsRight) → boxesStudentRight
  55. Zip(boxTool[unitWidth, unitWidth, A], A, pointsRight) → boxesRightFrame
  56. If(0.5 < animate2A < 1, {245 / 255, 224 / 255, 210 / 255}, {245 / 255, 224 / 255, 210 / 255}) → colorStage2X
  57. Max(floor((animate2C * 10)), 1) → fadeIndex

AI Drawing Prompt Reference

Create an educational “balance beam” visualization for solving algebra. Show a fixed canvas with a central pivot point and two arms that rotate symmetrically by the same angle around the center. At each arm end, represent quantity using a grid of small unit boxes laid out in layered rows/columns. Construct left-side candidate box positions, then animate stage-based actions where subsets of boxes translate, fade out, and reappear at designated right-side destination positions. Define right-side allowable and stationary configurations to reflect constraints, and include a polygonal boundary frame around the layout area to indicate the active region. Use stage-dependent coloring (and slightly different tones for “correct” vs “not correct”) to emphasize the progression from initial balance to the final configuration, connecting the model steps to solving two-step linear equations and inequalities.
The prompt above was compiled from the original drawing commands and is for reference only.