44 * All shapes drawn to the screen have a position that is
55 * specified as a coordinate. All coordinates are measured
66 * as the distance from the origin in units of pixels.
7- * The origin [ 0, 0] is the coordinate is in the upper left
7+ * The origin ( 0, 0) is the coordinate is in the upper left
88 * of the window and the coordinate in the lower right is
9- * [ width-1, height-1] .
9+ * ( width-1, height-1) .
1010 */
1111
1212// Sets the screen to be 640 pixels wide and 360 pixels high
@@ -16,22 +16,22 @@ size(640, 360);
1616background (0 );
1717noFill ();
1818
19- // The two parameters of the point() method each specify coordinates .
20- // The first parameter is the x-coordinate and the second is the Y
19+ // The two parameters of the point() function define its location .
20+ // The first parameter is the x-coordinate and the second is the y-coordinate
2121stroke (255 );
22- point (width * 0.5 , height * 0.5 );
23- point (width * 0.5 , height * 0.25 );
22+ point (320 , 180 );
23+ point (320 , 90 );
2424
2525// Coordinates are used for drawing all shapes, not just points.
2626// Parameters for different functions are used for different purposes.
2727// For example, the first two parameters to line() specify
2828// the coordinates of the first endpoint and the second two parameters
2929// specify the second endpoint
3030stroke (0 , 153 , 255 );
31- line (0 , height * 0.33 , width , height * 0.33 );
31+ line (0 , 120 , 640 , 120 );
3232
33- // By default, the first two parameters to rect() are the
34- // coordinates of the upper-left corner and the second pair
35- // is the width and height
33+ // The first two parameters to rect() are the coordinates of the
34+ // upper-left corner and the second pair is the width and height
35+ // of the rectangle
3636stroke (255 , 153 , 0 );
37- rect (width * 0.25 , height * 0.1 , width * 0.5 , height * 0.8 );
37+ rect (160 , 36 , 320 , 288 );
0 commit comments