Practice 2.1

  1. Replicate Figure 2.3 using Processing. Do not worry about colouring the shapes or adjusting the thickness of the lines and points at this time. Resize the canvas if necessary.
  2. Create a square in three different ways: using the rect command, the square command, and the line command.
  3. Create a circle in two different ways: using the ellipse command and the circle command.
  4. Create a triangle in two different ways: using the triangle command and the line command.

 

Extension

Create a yellow star using the createShape and fill commands. You may need to use the Processing Reference for assistance.