这段时间初步学习了一下Processing编程,现在贴上所学的部分结果,以备查用。

[slideshow_deploy id=’7866′]

下面贴上一个好玩的~

效果:

源代码:

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);
      }
    }
  }
}

 

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注