Hacker News new | ask | show | jobs
by akashakya 548 days ago
Tl;dr fancy way to map 1D time to 2D image

If you imagine a movie as a line along the time axis with each frame as a pixel, there are multiple way to create an 2D image.

Bargraph is simple approach, but essentially it is still is a one dimensional. We are only using x axis.

Zig-zag pattern is another approach, where you start from top to bottom, left to right. But in this case the relative distance between close frames aren't fully preserved. Two distant frames might appear together, or close frames might end up far apart, which leads to odd looking artifacts.

Hilbert curve is a pattern to map 1D to fill space (2D) such that relative distance between any two points (frames) on the 1D line is somewhat preserved. That's why it appears as clump/blob.

Here it is hard to see the movie progression from start to end but all frames from a scene are always closer, which was what I was aiming. I find it interesting that visual aspect (color/scene) is easy to see here but temporal aspect isn't.

I was excited about the whole 1D to 2D mapping aspect at that time, leading to this toy.

1 comments

Another good example of hilbert curves as visualization is this online bin file analyzer:

https://binvis.io/#/view/examples/elf-Linux-ARMv7-ls.bin