package sample.svg;

import static util.SVGUtil.*;

public class TurtlePolygon {
	public static void main(String[] args) {
		int n=6, r=100;
		start();
		noFill();
		stroke(0x3f3f3f);
		beginShape();
		vertex(0, 0);
		vertex(pageWidth(), 0);
		vertex(pageWidth(), pageHeight());
		vertex(0, pageHeight());
		endShape(true);
		stroke(0x0000ff);
		go(centerX()+r, centerY());
		turn(360.0/n/2+90);
		for (int i=0; i<n; i++) {
			forward(r);
			turn(360.0/n);
		}
		finish();
	}
}
