annotate June/processingD1/processingD1.pde @ 158:d64d965ec30a
Studying different average calculations
author |
Rod Selfridge <r.selfridge@qmul.ac.uk> |
date |
Tue, 26 Jan 2016 18:24:01 +0000 |
parents |
819d71fa7fac |
children |
|
rev |
line source |
r@49
|
1 // Example 05-02 from "Getting Started with Processing"
|
r@49
|
2 // by Reas & Fry. O'Reilly / Make 2010
|
r@49
|
3
|
r@49
|
4 int position;
|
r@49
|
5
|
r@49
|
6 void setup() {
|
r@49
|
7 size(1420, 900);
|
r@49
|
8 background(128);
|
r@49
|
9 position = 0;
|
r@49
|
10 }
|
r@49
|
11
|
r@49
|
12 void draw() {
|
r@49
|
13 background(128);
|
r@49
|
14 fill(0); // fill changes the color of the interior of the shape
|
r@49
|
15 noStroke(); // noStroke removes the outer line
|
r@49
|
16
|
r@49
|
17 // Does position represent the horizontal or the vertical location?
|
r@49
|
18 ellipse(80.5, 100.5, 30, 30);
|
r@49
|
19 ellipse(1080.5, 150.5, 30, 30);
|
r@49
|
20 ellipse(620.5, 650.5, 30, 30);
|
r@49
|
21
|
r@49
|
22 }
|
r@49
|
23
|