* @param theta the angle with which to calculate R
	 * @return the radius
	 */
	private double calculateR(int type, double theta) {
		double r = 0;
		switch(type){
			case 1 :
				r = scaleFactor * (Math.cos(3*theta));
				break;
			case 2 :
				r = scaleFactor * (a * theta);
				break;
			case 3 : 
				r = scaleFactor * (a * (1+ Math.cos(theta)));
				break;
			case 4 : 
				r = scaleFactor * (a * (1+ 2 * Math.cos(theta)));
				break;
			case 5 : 
				r = scaleFactor * (Math.pow(Math.cos(3 * theta), -8));	// 8th root 
				break;
			case 6 : 
				r = scaleFactor * ( 1+2*Math.cos(4 * theta));
				break;
			case 7 : 
				r = scaleFactor * ( 1+2*Math.cos(3 * theta));
				break;
			case 8 : 
				r = scaleFactor * (
						Math.pow(Math.E, Math.cos(theta))
						- (2*Math.cos(4*theta))
						+ (Math.pow(Math.sin(theta/12), 5)));
				break;
			case 9 : 
				r = scaleFactor * (
						Math.pow(Math.E, Math.sin(theta))
						-(2*Math.cos(4*theta))
						+(Math.pow(Math.cos(theta/4), 3))); 
				break;
		}
		return r;
		
	}