Back to front pageView on Hacker News (opens in a new tab)Ask HN: What's your favorite elegant/beautiful algorithm?733 pointsby algobuddy (on Hacker News)8 years agoComments (491) 209 threadsShow all commentsShowing thread 94 of 209[-]0-_-08 years ago1 reply#Floyd–Steinberg dithering of images:https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dither...It can simulate color transitions with fewer colours by using a simple error diffusion algorithm.jansan8 years ago#I love this algorithm. Had a lot of fun implementing this in Java and Javascript. It gets a bit tricky though if colors have an alpha channel.
Ask HN: What's your favorite elegant/beautiful algorithm?733 pointsby algobuddy (on Hacker News)8 years ago
0-_-08 years ago1 reply#Floyd–Steinberg dithering of images:https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dither...It can simulate color transitions with fewer colours by using a simple error diffusion algorithm.
jansan8 years ago#I love this algorithm. Had a lot of fun implementing this in Java and Javascript. It gets a bit tricky though if colors have an alpha channel.
Comments (491) 209 threads
Show all comments
Showing thread 94 of 209
https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dither...
It can simulate color transitions with fewer colours by using a simple error diffusion algorithm.