

import static util.SVGUtil.*;

public class Phyllotaxis {

	public static void main(String[] args) {
		start();
		rulers();
		double cx = centerX(), cy = centerY();
		pushMatrix();
		translate(cx-50, cy);
		scale(0.53, 0.75);
		for(int i=1; i<53; i++) {
			double kaku = i*PHYLLOTAXIS360; 
			stroke(hsl360(kaku*5, 100, 50));
			line(0, 0, 2*i*cos360(kaku), 2*i*sin360(kaku));
		}
		popMatrix();
		pushMatrix();
		translate(cx+65, cy+15);
		scale(0.53, 0.375);
		for(int i=1; i<53; i++) {
			double kaku = i*PHYLLOTAXIS360; 
			stroke(hsl360(kaku*3, 100, 50));
			line(0, 0, 2*i*cos360(kaku), 2*i*sin360(kaku));
		}
		popMatrix();
		finish();
		return;
	}
}
