    0

# What is the Advantages of bresenham's circle drawing algorithm?

Updated: 8/11/2023 Wiki User

6y ago

Let (xc,yc) be the centre of the circle

Let r be the radius of the circle

Let d be 3-2*r (d for decision)

Let x be 0

Let y be r

Repeat while x is less than y:

Increment x

If d is less than zero

Let d be d + ( 4 * x ) + 6

Else

Decrement y

Let d be d + (( x - y ) * 4 ) + 10

End if

Plot 8 points:

( xc+x, yc+y )

( xc-x, yc+y )

( xc+x, yc-y )

( xc-x, yc-y )

( xc+y, yc+x )

( xc-y, yc+x )

( xc+y, yc-x )

( xc-y, yc-x )

End repeat Wiki User

10y ago  Study guides

15 cards

## What is full form of rams GUI

➡️
See all cards
3.97
76 Reviews Wiki User

10y ago

int dx = Math.abs(x2 - x1); int dy = Math.abs(y2 - y1); int sx = (x1 < x2) ? 1 : -1; int sy = (y1 < y2) ? 1 : -1; int err = dx - dy; while (true) { framebuffer.setPixel(x1, y1, Vec3.one); if (x1 == x2 && y1 == y2) { break; } int e2 = 2 * err; if (e2 > -dy) { err = err - dy; x1 = x1 + sx; } if (e2 < dx) { err = err + dx; y1 = y1 + sy; } }   Earn +20 pts  