HuluWZ / Line-And-Circle-Drawing-Algorithms

Line and Circle Drawing Algorithms in Python
3 stars 1 forks source link

First point in the Bresenham's algorithm may be drawn twice #1

Open silensrunners opened 2 years ago

silensrunners commented 2 years ago

Hello!

First of all thanks a lot for the implementations, they are really useful.

I think though, that the call to the CirclePlotPoints made in the Bresenham's algorithm. CirclePlotPoints(x_centre, y_centre, x, y) x += 1 needs to be called AFTER increasing "x". x += 1 CirclePlotPoints(x_centre, y_centre, x, y) Otherwise, since the function is calling CirclePlotPoints at the beginning it is possible that the same point will be drawn twice.

BR, Ixent.

HuluWZ commented 2 years ago

ur right bro ,i will fix that @silensrunners 🙏