Circle now stay in the box

Subtracted the max value for x and y by the diameter ("d") to ensure that the circles (drawn from top left) stay in the bounds of the lower left quadrant.