-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3fad5a2
commit 2e10934
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// 長さ、方向、色のランダムな太い半透明の棒 | ||
// 200本で停止 | ||
void setup() { | ||
size(800,600); | ||
frameRate(10); | ||
background(0); | ||
} | ||
|
||
void lines() { | ||
int w = 30; | ||
int c1 = int(random(256)); | ||
int c2 = int(random(256)); | ||
int c3 = int(random(256)); | ||
int a = int(random(800)); | ||
int b = int(random(800)); | ||
int c = int(random(800)); | ||
int d = int(random(800)); | ||
stroke(c1,c2,c3,200); | ||
strokeWeight(w); | ||
line(a,b,c,d); | ||
} | ||
int l = 0; | ||
void draw() { | ||
if (l > 200) { | ||
exit(); | ||
} | ||
lines(); | ||
l+=1; | ||
println(l); | ||
} |