Challenge #11 - Midpoint circle algorithm

My take on the 11th weekly challenge by Jamis Buck.

In computer graphics, the midpoint circle algorithm is an algorithm used to determine the points needed for rasterizing a circle (source: wikipedia).

This is a naive implementation of the Midpoint circle algorithm, it is simple to grasp and it is a good starting point.

Radius:
Origin (x0):
Origin (y0):