function bresenham(x0, y0, radius, setPixel, quadrants) {
  //
  // credit: Following code is copied almost verbatim from
  // http://en.wikipedia.org/wiki/Midpoint_circle_algorithm
  // Bresenham's circle algorithm
  //
  var f = 1 - radius;
  var ddF_x = 1;
  var ddF_y = -2 * radius;
  var x = 0;
  var y = radius;
  var defaultQuadrants = {
    topleft: true,
    topright: true,
    bottomleft: true,
    bottomright: true
  };
  quadrants = quadrants ? quadrants : defaultQuadrants;
  /*
   II  | I
   ------------
   III | IV
   */
  if (quadrants.topleft || quadrants.topright) setPixel(x0, y0 + radius); // quadrant I/II topmost
  if (quadrants.bottomleft || quadrants.bottomright) setPixel(x0, y0 - radius); // quadrant III/IV bottommost
  if (quadrants.topright || quadrants.bottomright) setPixel(x0 + radius, y0); // quadrant I/IV rightmost
  if (quadrants.topleft || quadrants.bottomleft) setPixel(x0 - radius, y0); // quadrant II/III leftmost

  while (x < y) {
    if (f >= 0) {
      y--;
      ddF_y += 2;
      f += ddF_y;
    }
    x++;
    ddF_x += 2;
    f += ddF_x;
    if (quadrants.topright) {
      setPixel(x0 + x, y0 + y); // quadrant I
      setPixel(x0 + y, y0 + x); // quadrant I
    }
    if (quadrants.topleft) {
      setPixel(x0 - x, y0 + y); // quadrant II
      setPixel(x0 - y, y0 + x); // quadrant II
    }
    if (quadrants.bottomleft) {
      setPixel(x0 - x, y0 - y); // quadrant III
      setPixel(x0 - y, y0 - x); // quadrant III
    }
    if (quadrants.bottomright) {
      setPixel(x0 + x, y0 - y); // quadrant IV
      setPixel(x0 + y, y0 - x); // quadrant IV
    }
  }
}
*********************************************************************
### Drone.arc() method

The arc() method can be used to create 1 or more 90 degree arcs in the
horizontal or vertical planes. This method is called by cylinder() and
cylinder0() and the sphere() and sphere0() methods.

#### Parameters

arc() takes a single parameter - an object with the following named properties...
radius - The radius of the arc.
blockType - The type of block to use - this is the block Id only (no meta). See [Data Values][dv].
meta - The metadata value. See [Data Values][dv].
orientation (default: 'horizontal' ) - the orientation of the arc - can be 'vertical' or 'horizontal'.
stack (default: 1 ) - the height or length of the arc (depending on the orientation - if orientation is horizontal then this parameter refers to the height, if vertical then it refers to the length ).
strokeWidth (default: 1 ) - the width of the stroke (how many blocks) - if drawing nested arcs it's usually a good idea to set strokeWidth to at least 2 so that there are no gaps between each arc. The arc method uses a [bresenham algorithm][bres] to plot points along the circumference.
fill - If true (or present) then the arc will be filled in.
quadrants (default: `{topleft:true,topright:true,bottomleft:true,bottomright:true}` - An object with 4 properties indicating which of the 4 quadrants of a circle to draw. If the quadrants property is absent then all 4 quadrants are drawn.

#### Examples

To draw a 1/4 circle (top right quadrant only) with a radius of 10 and
stroke width of 2 blocks ...

    arc({blockType: blocks.iron, 
         meta: 0, 
         radius: 10,
         strokeWidth: 2,
         quadrants: { topright: true },
         orientation: 'vertical', 
         stack: 1,
         fill: false
         } );

![arc example 1](img/arcex1.png)

[bres]: http://en.wikipedia.org/wiki/Midpoint_circle_algorithm
[dv]: http://www.minecraftwiki.net/wiki/Data_values
*