3 ms·
Back in the '80s in Bulgaria, I was only able to find the Bresenham's algorithm for circles, but needed to draw an ellipse (in 6052 assembly, well, machine code
by nikolay 5y ago
Back in the '80s in Bulgaria, I was only able to find the Bresenham's algorithm for circles, but needed to draw an ellipse (in 6052 assembly, well, machine code), and was so proud that I manage to do it.
- mjcohen 5y agoDid it work for any axes?
- nikolay 5y agoAs far as I can recall, yeah. By the way, I found this [0] implementation in pseudo code. [0]: https://dai.fmph.uniba.sk/upload/0/01/Ellipse.pdf https://dai.fmph.uniba.sk/upload/0/01/Ellipse.pdf
- Radim 5y agoThe lessons you learn on your own stick the best, don't they? I remember a similar "heureka" moment when I derived a line-drawing algorithm that respected "subpixel" starting and ending points. That is, don't assume a line starts/ends in the middle of a pixel (like most algos do), but rather at an arbitrary point. I forgot why I needed this (something to do with near-axis-aligned polygon slopes not looking right on a highly rasterized problem). But I do remember the elation when I finally got it to work :-) Also early 1990s, no internet and no English for extra fun.