int width = 550;
int height = 550;
int centx = width/2;
int centy = width/2;
float multi = 2;
float rad = 180;
int frameMax = 1000;
int zusatz;
float colHue, colSat, colBri, Hue;

void setup() {
  size(width,height);
  background(0);
  smooth();
  strokeWeight(0.4);
  colorMode(HSB, 360,100,100);
  noFill();
  frameRate(24);
  Hue =random(180,270);
}

void draw() {
  noFill();

  drawShape(mouseX,mouseY);
  if(frameCount==frameMax)
  {
    noLoop();
  }
}

void drawShape(float ex, float why) {
  float x = ex;
  float y = why;
  float posx, posy;

  float versatz;

  colSat = map(frameCount, 0, frameMax,100, 60);//saturation
  colBri = map(frameCount, 0, frameMax, 40, 100);//transparent
  stroke(Hue,colSat,colBri);
  beginShape();
  versatz = 1.3*(frameCount%45);

  if(versatz == 0) {
    centx +=random(-4,4);
    centy-= random(-6,6);
    multi = 1.3+sin(radians(frameCount));
    rad +=20;
    zusatz += random(-120,120);
  }

  for( int i=0; i<3; i++) {
    posx = centx + rad*(cos(radians(zusatz+i*120+versatz)));
    posy = centy + rad*(sin(radians(zusatz+i*120+multi*versatz)));
    vertex(posx, posy);
  }
  endShape(CLOSE);
}