float r = 0;
int numrays = 70;
float raywidth = 10;
 
int nodeX = 0,nodeY = 0;
 
float raySpeed = 0.001;
 
float cHue = .6;
 
void setup(){
size(550,550);
smooth();
colorMode(HSB,1.0);
 
}
 
void draw(){
background(0,0,1);
stroke(0);
noStroke();
r += raySpeed;
fill(cHue,.7,.8);
translate(width/2,height/2);
translate(nodeX,nodeY);
rotate(r);
for (int i=0; i < numrays; i++){
rotate(2*PI/numrays);
beginShape();
vertex(0,0);
vertex(500,raywidth);
vertex(500,-raywidth);
endShape();
}
 
}
 
 
void mouseDragged(){
if (mouseButton == RIGHT){
raywidth += (mouseX-pmouseX);
numrays += (mouseY-pmouseY);
}
else if (mouseButton == CENTER){
raySpeed += (mouseY-pmouseY)/5000.f;
cHue += (mouseX-pmouseX)/100.f;
if (cHue > 1.f) cHue = 1;
if (cHue < 0.f) cHue = 0;
}
else{
nodeX += (mouseX-pmouseX);
nodeY += (mouseY-pmouseY);
}
}