class GeraldineBoid extends Boid{ color c; float sequence; GeraldineBoid(color c_){ super(); r = 20; c = c_; } void render() { // rotate the boid to face to proper direction float theta = vel.heading2D() - radians(90); for(int i=0; i<20; i=i+5) { push(); translate(loc.x(), loc.y()); rotateZ(theta); ellipseMode(CENTER); sequence += .05; ellipse(0, 0, r+i, noise(sequence)*width/12); ellipse(0, 0, noise(sequence)*width/6, r); ellipse(0, 0, r+i, noise(sequence)*width/6); line(0, 0, acc.x()*600f, acc.y()*600f); ellipse(0, 0, 5, 5); ellipse(acc.x()*600f, acc.y()*600f, 5, 5); pop(); } stroke(c); noFill(); } }