Skip to main content

Pixel Planet Earth

Challenge: The color information of the Pixel Planet Earth has been recorded in a 10 x 10 table. Each cell in the table contains a number representing a specific color. 0 represents no color, 1 represents blue, and 2 represents green. The object of the activity is to code the VR Robot based on the color information stored in the table to fill in the appropriate grids on the Canvas + playground with the corresponding colors to create a Pixel Planet Earth!

The color information in a 10X10 table is as follows:

0

0

0

0

1

1

0

0

0

0

0

0

2

2

2

1

1

1

0

0

0

2

2

2

1

1

1

2

2

0

0

2

1

1

1

1

2

2

2

0

1

1

2

1

1

1

2

2

1

1

1

1

2

2

2

1

1

2

2

1

0

1

1

2

2

1

1

2

1

0

0

1

1

2

1

1

1

1

1

0

0

0

1

2

1

1

1

1

0

0

0

0

0

0

1

1

0

0

0

0


 

  • Choose and Download the Pixel Planet Earth activity image as a PNG file from this Google slideshow.
  • Select the Art Canvas+ Playground and upload the Pixel Planet Earth activity image.
    • To learn more about uploading images to the Art Canvas+ Playground, see this article.
  • Declare a 2D list with 10 rows and 10 columns and store the color data in the list.
  • Declare a variable to track the column index, declare a variable to track the row index, and set the initial value of the variables to 1. 
  • Drive the VR Robot to the grid at row 1, column 1.
  • Code the VR Robot to create the Pixel Planet Earth on the Art Canvas+ playground.
    • Determine and fill the corresponding color in the current grid based on the corresponding color data retrieved in the list using the index variables.
    • Move the robot to the next grid in the row.
    • Increase the column index variable by 1 to point to the next item’s position in the list.
    • Use a loop to repeat the above steps for a set number of times to fill each grid in the row with the corresponding color.
    • Drive the robot to the grid at column 1 in the next row and update the index variables.
    • Use a nested loop to repeat filing the grids in each row with the corresponding colors to create the Pixel Planet Earth.

Helpful Hints

  • Use the set 2D list to block from the Variables category to set every item in the 2D list to the entered values. Set 2D List
    • Matching Python command:Set 2D List Python
  • The distance across one grid at the Art Canvas + playground is 200mm.