Skip to main content

Triangle Fun

Use the VR Pen to draw around the perimeter of a selected triangle and create a funny face on it! Calculate the perimeter of the triangle, then print the calculated value using the Print Console.

  • Select the Shape Tracer Playground.
  • Select a triangle located at starting points A, B, or C.
  • Code the VR Robot to draw around the perimeter of the selected triangle using [Drive for], [Turn for], and the VR Pen blocks.
  • Design an algorithm to calculate the total perimeter of the triangle.
    • Declare a variable to store the perimeter value.
    • Use the side lengths and the add block to calculate the perimeter. Store the calculated value in the variable.
    • Use the [print] block to print the variable value to the Print Console.
  • Drive the VR Robot to draw a funny face on the triangle using the VR Pen!

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 Button from the VEXcode VR Playground window.