Bresenham’s Circle Drawing Algorithm

  • Published on
    14-Nov-2014

  • View
    6

  • Download
    2

Transcript

//THE CODE typedef long fixed16_16; fixed16_16 SIN_ACOS[1024]; /************************************************************************** * circle_fast * * Draws a circle by using fixed point numbers and a trigonometry * * table. * **************************************************************************/ void circle(int x,int y, int radius, byte color) { fixed16_16 n=0,invradius=(1/(float)radius)*0x10000L; int dx=0,dy=radius-1; word dxoffset,dyoffset,offset = (y

Recommended

View more >