public void next(int width, int height) {
		angle = (angle + 5)%360;
		if (vertical) {
			if (rectHeight <= 0) {
				incHeight = -incHeight;
			}
			if (rectHeight >= height) {
				incHeight = -incHeight;
				vertical = false;
			}
			rectHeight = rectHeight + incHeight;
		} else {
			if (rectWidth <= 0) {
				incWidth = -incWidth;
			}
			if (rectWidth >= width) {
				incWidth = -incWidth;
				vertical = true;
			}
			rectWidth = rectWidth + incWidth;
		}
	}