PVector_ellipse04

PVector pos1;
PVector pos2;
PVector pos3;

void setup() {
  size(500, 500);
  colorMode(HSB, 360, 100, 100, 100);
  smooth();
  noStroke();
  background(0, 0, 100);
}

void draw() {  
  fill(0, 0, 100, 20);
  rect(0, 0, width, height);
  
  translate(width/2, height/2);
  rotate(frameRate);
  
  pos1 = new PVector(0, 0);

  for (int  i = 0; i < 360; i += 30) {

    float a = radians(i);
    pos2 = new PVector(cos(a)*2, sin(a)*2);
    pos1.add(pos2);
    fill(random(360), 100, 100, 50);
    ellipse(pos1.x, pos1.y, 50, 50);
    ellipse(pos1.y, pos1.x, 50, 50);

    for (int  j = 0; j < 180; j += 1) {
      float b = radians(j);
      pos3 = new PVector(cos(b), sin(b));
      pos1.add(pos3);
      fill(random(360), 100, 100, 50);
      ellipse(pos1.x, pos1.y, 30, 20);
      ellipse(pos1.y, pos1.x, 30, 20);
    }
  }
}

つくりたいものとはちがうものができたけど,これはこれで気持ち悪いのでよい.雰囲気で何かは書けるようになったが,想像したものができないので,もっと修行が必要.