Bryan Mumford wrote: > I wanted to perform trig functions on integers in the range of +/- > 1,000,000. I figured I would represent these numbers with three > bytes. But what I really want is to plot circles Bryan: You should have said so originally. Bresenham's circle algorithm: x = 0 y = radius switch = 3 - 2*radius loop: plot (x,y): plot (x,-y): plot (-x,y): plot (-x,-y) plot (y,x): plot (y,-x): plot (-y,x): plot (-y,-x) if switch < 0 then switch = switch + 4 * x + 6 else switch = switch + 4 * (x - y) + 10 y = y - 1 x = x + 1 if x <= y then goto loop end -Andy === Andrew Warren -- aiw@cypress.com === Principal Design Engineer === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body