Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
RGB K-D Tree (2016) (allrgb.com)
53 points by hyperific on Feb 20, 2024 | hide | past | favorite | 14 comments


FYI:

This project site is a gallery of images created using one pixel for every RGB color (all 16,777,216 of them, no duplicates)


These are impressive, I wonder how he computes them: https://allrgb.com/al-zimmermann


According to the user on that site "alzayani":

sort an array of all 16777216 image positions (x,y) randomly

loop the positions array and for each position:

read the pixel color at the position as a reference

sample N random colors from the available colors list

for each sample calculate the hypotenuse from the reference color Math.hypot(R - r, G - g, B - b).

find the nearst color, use it for that position in the output image update the list of avalible colors (for practicality in chunks)


Wait, is that the Al Zimmermann, who runs the massive recreational math programming contests http://azspcs.com/?

Without looking into what these images actually are and how they are generated, they remind me of mosaics I've made of hobby game contests https://williame.github.io/media/old/143376853353_1.jpg using https://en.wikipedia.org/wiki/Hungarian_algorithm, except _better_.


https://allrgb.com/radiator does something weird to my display, the lines extend beyond the window


Yeah same here. Had it with other "pulse trains" or similar harsh repetitive structures.

Guessing it's some resonances in the cable or so?


I believe it's typically a resonance in a power supply / voltage regulator.


Ah yes, that makes a lot more sense.


Yeah, I get weird horizontal lines that follow the image but extend to the edges of the screen. Since it extends to both sides it doesn't feel like a panel artifact, but a processing one.


Oh wow, I make those too using a similar technique:

https://tim.fish/assets/images/omni/drip.png https://tim.fish/assets/images/omni/splut.png

The code is here if you’re in the mood to be morbidly fascinated by my hacky python https://github.com/TimEwing/omni

Worth noting mine are only 7-bit instead of 8-bit because my poor little lenovo kept running out of ram and crashing.


Can you use a memory mapped file?


Wow, that's some impressive dithering. No lie, the "grayscale" images are the most impressive to me. Reminds me of color half-tone printing and film grain.

I wonder what videos games look like in this visual interpretation. I want this as a shader.


It reminds me of a project I've built recently: https://reversedns.space/

Although it is not guaranteed to contain every RGB color, it is very likely.


Why is "random RGB" instantly recognizable by the weirdly large/disproportionately noticeable amount of "random RGB purple" (#C31BEE for example)?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: