tenox7 / aclock

ascii analog clock for text console displays and terminals and terminal emulators
Apache License 2.0
87 stars 15 forks source link

use classic bresenham line draw algorithm #6

Open tenox7 opened 5 years ago

tenox7 commented 3 years ago

https://www.geeksforgeeks.org/bresenhams-circle-drawing-algorithm/

larsbrinkhoff commented 2 years ago

I made this simple implementation.

https://github.com/simh/simh/blob/master/display/display.c#L812-L876

larsbrinkhoff commented 2 years ago

I see the geeksforgeeks article is for drawing a circle. To go really classic, I'd suggest Minsky's algorithm. It draws an approximation of a circle, but I understand it's good enough to do trigonometry on a satellite.

tenox7 commented 2 years ago

Ha! Interesting. Thank you! I will take a look at your implementation.