Skip to main content

Unique Shape Area

Design an algorithm to use the VR Pen to draw lines around a selected shape to complete it into a big square or rectangle, and draw around the perimeter of each small individual square or triangle inside the big square or rectangle using a different Pen color. Calculate the area of your selected shape, then print the calculated value using the Print Console.

  • Select the Shape Tracer Playground.
  • Select a polygon located at starting points G, H, or I.
  • Code the VR Robot to draw lines around a selected shape to complete it into a big square or rectangle,
    • Determine the 4 vertex positions of the big square or rectangle.
    • Move the VR Robot to the vertex positions and draw lines to complete the selected shape into a big square or rectangle. 
  • Use the VR Pen to draw around the perimeter of each small individual square or triangle that makes up the big square or rectangle using a different Pen color.
    • Identify the individual squares or triangles that fit together to form a big square or rectangle.
    • Code the VR Robot to draw around the perimeter of each small individual square or triangle.
  • Calculate the area of the selected shape. 
    • Determine the side lengths of each individual square, rectangle, or triangle.
    • Calculate the areas of the individual squares, rectangles, or triangles using area formulas to find the area of the selected shape.
  • Use the [print] block to print the calculated area value to the Print Console.

Helpful Hints

  • To select a Start Position in the Shape Tracer Playground, select the menu button, then select the location button.

Menu Button from the VEXcode VR Playground window.

Select a Starting Position from the VEXcode VR Playground window.