Cleaning examples for Beta launch

This commit is contained in:
Casey Reas
2012-08-30 22:12:12 +00:00
parent a230a54c17
commit a52c7aed8c
15 changed files with 29 additions and 154 deletions
+10 -4
View File
@@ -25,19 +25,25 @@ void setup() {
void draw() {
int y1 = 0;
int y2 = height/3;
for (int i = 0; i < width; i++) {
stroke(coswave[i]*255);
line(i, 0, i, height/3);
line(i, y1, i, y2);
}
y1 = y2;
y2 = y1 + y1;
for (int i = 0; i < width; i++) {
stroke(coswave[i]*255 / 4);
line(i, height/3, i, height/3*2);
line(i, y1, i, y2);
}
y1 = y2;
y2 = height;
for (int i = 0; i < width; i++) {
stroke(255 - coswave[i]*255);
line(i, height/3*2, i, height);
line(i, y1, i, y2);
}
}
@@ -27,6 +27,10 @@ void setup() {
void draw() {
background(0);
// This embedded loop skips over values in the arrays based on
// the spacer variable, so there are more values in the array
// than are drawn here. Change the value of the spacer variable
// to change the density of the points
for (int y = 0; y < height; y += spacer) {
for (int x = 0; x < width; x += spacer) {
stroke(distances[x][y]);
@@ -2,8 +2,6 @@
* Array Objects.
*
* Demonstrates the syntax for creating an array of custom objects.
*
* Updated 26 February 2010.
*/
int unit = 40;
@@ -12,7 +10,6 @@ Module[] mods;
void setup() {
size(640, 360);
background(176);
noStroke();
int wideCount = width / unit;
int highCount = height / unit;