code: private static double getSideLengthFromInscribedRadius(double radius, int n) {
  		if (n == 2) {
  			return radius;
  		}
  		return radius * 2 * Math.tan(Math.PI/n);
  	}
docs: http://www.mathopenref.com/polygonincircle.html