float inc = 0.0;//incremento de angulo float dim = 50; void setup() { size(700, 700); background(0,0,255); smooth(); } void draw() { background(0); //speed inc += 0.004; //amount of rotation before reversal float angle = sin(inc) /5.0 ; translate(width/2,height/2); for (int i = 0; i < 8; i++) { //size of tail tail(10,-dim/2, 100, angle); rotate(PI/4); } //second circle resetMatrix(); translate(400,400); for (int i = 0; i < 8; i++) { //size of tail tail2(10,-dim/2, 40, angle); rotate(PI/4); } } //first circle void tail(float x,float y, int units, float angle) { translate(x/100, y/100); for (int i = units; i > 8; i--) { //line color stroke(150,0,56,100); //line size line(width/5, height/250, 100, -4); translate(0, -3); rotate(angle); } } //second circle void tail2(float x,float y, int units, float angle) { translate(x/100, y/100); for (int i = units; i > 8; i--) { //line color stroke(0,0,165,150); //line size line(width/5, height/250, 100, -4); translate(0, -3); rotate(angle); } }