这段时间初步学习了一下Processing编程,现在贴上所学的部分结果,以备查用。
[slideshow_deploy id=’7866′]
下面贴上一个好玩的~
效果:
源代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
void setup() { size(600, 600); background(0); smooth(); noFill(); } void draw() { for (int d=0;d<70;d+=4)//圆半径 { for (int x=0;x<650;x+=80)//圆心x位置 { for (int y=0;y<650;y+=80)//圆心y位置 { stroke(random(255), random(255), random(255)); strokeWeight(4); ellipse(x, y, d, d); } } } } |