mirror of
https://github.com/processing/processing4.git
synced 2026-01-28 19:01:08 +01:00
Reference edits for 2.0, text corrections
This commit is contained in:
@@ -20,6 +20,7 @@ void setup() {
|
||||
float amount = map(i, 0, width, 0, PI);
|
||||
coswave[i] = abs(cos(amount));
|
||||
}
|
||||
background(255);
|
||||
noLoop();
|
||||
}
|
||||
|
||||
@@ -27,21 +28,21 @@ void draw() {
|
||||
|
||||
int y1 = 0;
|
||||
int y2 = height/3;
|
||||
for (int i = 0; i < width; i++) {
|
||||
for (int i = 0; i < width; i+=2) {
|
||||
stroke(coswave[i]*255);
|
||||
line(i, y1, i, y2);
|
||||
}
|
||||
|
||||
y1 = y2;
|
||||
y2 = y1 + y1;
|
||||
for (int i = 0; i < width; i++) {
|
||||
for (int i = 0; i < width; i+=2) {
|
||||
stroke(coswave[i]*255 / 4);
|
||||
line(i, y1, i, y2);
|
||||
}
|
||||
|
||||
y1 = y2;
|
||||
y2 = height;
|
||||
for (int i = 0; i < width; i++) {
|
||||
for (int i = 0; i < width; i+=2) {
|
||||
stroke(255 - coswave[i]*255);
|
||||
line(i, y1, i, y2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user