Area Fun Using a Grid

Area Fun Using a Grid
Loading the math board and drawing, please wait…
2023-05-25 03:14
Build your own figures on a grid using unit squares to explore areas of rectangles, squares, and composite shapes. This example demonstrates area calculation, non-standard units, and standard units. Constructed using GeoGebra commands like Zip, PointToPixels, Flatten, Sequence, centerBox, Polygon, Remove, IsInRegion, Element, If, Vector, Sort, Length, Corner. Suitable for grades 4-5 to learn determining areas of rectangles, squares, and composite figures using grids and standard units.

GeoGebra Commands & Parameters

  1. Zip(If[Mod[A, 10] ≟ 0, 20, 0] + Mod[A, 10] + ((9 - Div[A, 10]) * 10), A, filledIndex) → filledIndexReverse
  2. PointToPixels(Corner[1], Corner[3], Corner[5], startPt) → StartPixels
  3. Flatten(Sequence[Sequence[(Mod[A, gridMaxX], Mod[B, gridMaxY]), A, 0, gridMaxX - 1], B, 0, gridMaxY - 1]) → AllBoxPoints
  4. Zip(Element[AllBoxPoints, A], A, filledIndex) → filledBoxPoints
  5. Sequence(false, k, 1, 100) → falseList
  6. centerBox(boxWidth, boxHeight, moveablePt) → moveableBox
  7. centerBox(boxWidth, boxHeight, startPt) → startBox
  8. Polygon((0, 0) - (boxWidth / 2, boxHeight / 2), (gridMaxX, 0) - (boxWidth / 2, boxHeight / 2), (gridMaxX, gridMaxY) - (boxWidth / 2, boxHeight / 2), (0, gridMaxY) - (boxWidth / 2, boxHeight / 2)) → Region, f, g, h, i
  9. Remove(KeepIf[0 < x < (gridMaxX * gridMaxY) + 1, Unique[Flatten[Zip[If[Mod[A, 10] ≟ 1, {A + gridMaxX, A + 1, A - gridMaxX}, If[Mod[A, 10] ≟ 0, {A + gridMaxX, A - gridMaxX, A - 1}, {A + gridMaxX, A + 1, A - gridMaxX, A - 1}]], A, filledIndex]]]], filledIndex) → adjIndex
  10. Zip(Element[AllBoxPoints, A], A, adjIndex) → adjPoints
  11. Zip(Distance[A, closestIntPoint], A, adjPoints) → distanceList
  12. IsInRegion(moveablePt, Region) → inRegion
  13. Element(adjIndex, IndexOf[Min[distanceList], distanceList]) → minIndex
  14. If(currentIndex ≟ 0, startPt, Element[AllBoxPoints, currentIndex]) → endPoint
  15. Vector(moveablePt, endPoint) → TransVec
  16. centerBox(boxHeight, boxWidth, moveablePt + (animatePoint * (x(TransVec), y(TransVec)))) → movingBox
  17. Zip(If[A, "colorPurpleButton", "colorGreyInactiveButton"], A, boxList) → colorBoxes
  18. Remove(AllBoxPoints, filledBoxPoints) → greyBoxPoints
  19. Zip(centerBox[boxHeight, boxWidth, A], A, greyBoxPoints) → greyBoxes
  20. Zip(centerBox[boxHeight - gap, boxWidth - gap, A], A, filledBoxPoints) → filledBoxes
  21. Sequence(Segment[(((-boxWidth)) / 2, ((-boxHeight)) / 2) + (A * (boxWidth, 0)), (((-boxWidth)) / 2, gridMaxY - boxHeight / 2) + (A * (boxWidth, 0))], A, 1, gridMaxX - 1) → verticalLines
  22. Sequence(Segment[(((-boxWidth)) / 2, ((-boxHeight)) / 2) + (A * (0, boxHeight)), (((-boxWidth)) / 2 + gridMaxX, ((-boxHeight)) / 2) + (A * (0, boxHeight))], A, 1, gridMaxY - 1) → horizontalLines
  23. Sort(filledIndex, filledIndexReverse) → sortedFilledIndex
  24. Zip(Element[AllBoxPoints, A], A, Take[sortedFilledIndex, 1, fillArea]) → showAreaBoxPoints
  25. Zip(centerBox[boxHeight - gap, boxWidth - gap, A], A, showAreaBoxPoints) → showAreaFilledBoxes
  26. Length(filledIndex) → area
  27. Zip(centerBox[boxHeight, boxWidth, A], A, Remove[filledBoxPoints, showAreaBoxPoints]) → emptyBoxOutline
  28. Corner(5) → corner5
  29. onboardingTextOffset(Corner[onboardingText, 1], Corner[onboardingText, 3], 1, Corner[1], Corner[3], Corner[5]) → OnboardingTextOffset
  30. expandQuad(Vertex[moveableBox, 1], Vertex[moveableBox, 2], Vertex[moveableBox, 3], Vertex[moveableBox, 4], (7 * pulsing), Corner[1], Corner[3], Corner[5]) → pulsingSquare
  31. If(area ≟ 1, "", "s") → sText

AI Drawing Prompt Reference

Draw an interactive area exploration figure on a grid. The grid consists of equal-sized square cells covering a rectangular region. Some cells are filled purple to represent selected unit squares, while others remain gray. A draggable square is used to select or deselect cells, and the filled area is highlighted. The figure includes grid lines, cell outlines, and a text label showing the current selected area. It is designed to demonstrate area calculation for rectangles, squares, and composite shapes, allowing the user to change the filled region by dragging.
The prompt above was compiled from the original drawing commands and is for reference only.