Skip to content

Instantly share code, notes, and snippets.

@tboydar
Created October 11, 2013 02:51
Show Gist options
  • Save tboydar/6928873 to your computer and use it in GitHub Desktop.
Save tboydar/6928873 to your computer and use it in GitHub Desktop.
亂數畫圓
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