Created
October 11, 2013 02:51
-
-
Save tboydar/6928873 to your computer and use it in GitHub Desktop.
亂數畫圓
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
int xx = 200; | |
void setup() { | |
size(300, 300); //畫面尺寸 | |
background(255);//背景白色 | |
} | |
void draw() | |
{ | |
background(255); | |
fill(255, 0, 0); //畫圖填滿紅色 | |
ellipse(xx, 200, 60, 50); //畫圓 | |
line(xx, 0, xx, height); | |
line(0, 200, width, 200); | |
xx = int(random(0, 200)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment