import static util.Common.cos360;
import static util.Common.sin360;
import static util.SVGUtil.*;

public class StarBall {
    public static void main(String[] args) {
        int i, j;
        double x = -0.7, angle = 8, r = 12, a;
            
        start();
        rulers();
        fill(0xc0c0c0);
        rect(20, 95, pageWidth()/2, 30);
        
        noFill();
        pushMatrix();
        translate(centerX()-60, centerY());
        for (i=0; i<30 ;i++) {
            stroke(hsb1(i/30.0, 1, 1));
            rotate360(i*angle);
            translate(i*x, 0);
            
            pushMatrix();
            translate(40, 40);
            beginShape();
			for (j=0, a=90; j<5; j++, a+=144) {
				vertex(r*cos360(a), -r*sin360(a));
			}
            endShape(true);
            popMatrix();
        }
        popMatrix();
        
        noStroke();
        textFont("Times New Roman", 16);
        fill(0xffffff);
        text("Kagawa Univ.", 40, 110);
                
        textFont("Times New Roman", 10);
        fill(0xffffff);
        text("Kagawa Lab.", 105, 120);

        finish();
        return;
    }

}
