import java.awt.Graphics;

public class wig extends java.applet.Applet {
	polar line[] = new polar[10];
	int len = 10;
	int centerX = 150, centerY = 150;

	public void init() {
   		resize(300,300);
		for (int i = 0; i < len; i++) {
			line[i].r = 10.0;
			line[i].theta = 0.0;
			}
    }
    public void paint(Graphics g) {
		int x,y, x1,y1;

		move();

		// plot the line
		x = centerX; y = centerY;
		for (int i; i < len; i++) {
			x1 = x + (int)(line[i].r * cos(line[i].theta));
			y1 = y + (int)(line[i].r * sin(line[i].theta));
			drawLine(x,y, x1,y1);
			x = x1; y = y1;
			}
    }

	// tweak the angles
	void move() {
		for (int i = 0; i < len; i++) {
//			line[i].theta *= random()/10.0;
			line[i].theta *= i*10;
			}
	}
}

class polar {
	double r, theta;
}
