package sample.svg.contributed;
import static util.SVGUtil.*;

public class StarBall {
    public static void main(String[] args) {
        int i, angle = 8, x = -1;
            
        start();
        rulers();
        fill(0x404040);
        rect(50, 95, 200, 30);
        
        textFont("Times New Roman", 16);
        fill(0xffffff);
        text("Kagawa Univ.", 110, 110);
                
        textFont("Times New Roman", 10);
        fill(0xffffff);
        text("Kagawa Lab.", 145, 120);
        
        noFill();
        translate(centerX(), centerY());
        for (i=0; i<30 ;i++) {
            stroke(hsb1(i/29.0, 1, 1));
            rotate(radians(i*angle));
            translate(i*x, 0);

            beginShape();
            vertex(50, 50-20);
            vertex(50-12, 50+15);
            vertex(50+18, 50-8);
            vertex(50-18, 50-8);
            vertex(50+12, 50+15);
            endShape(true);
        }

        finish();
        return;
    }

}
