Hacker News new | ask | show | jobs
by captainmuon 418 days ago
Except pixels are little squares. Sure, if you look under a microscope, they have funny shapes, but they are always laid out in a rectangular grid. I've never seen any system where the logical pixels are staggered like a hex grid, for example. No matter how the actual light emitters are arranged, the abstraction offered to the programmer is a rectangular grid.

If you light up pixels in a row, you get a line - a long thin rectangle - and not a chain of blobs. If you light them up diagnoally, you get a jagged line. For me that is proof that they squares - at least close enough to squares. Heck even on old displays that don't have a square pixel ratio they are squished squares ;-). And you have to treat them like little squares if you want to understand antialiasing, or why you sometimes have to add (0.5, 0.5) to get sharp lines.

(And a counterpoint: The signal-theoretical view that they are point samples is useful if you want to understand the role of gamma in anti-aliasing, or if you want to do things like superresolution with RGB-sub-pixels.)

3 comments

There are some screen types with variations on the geometry, like some sub-pixels shared between logical pixels. E.g. Samsung's diamond pixel https://global.samsungdisplay.com/29043/, Apple watch https://imgur.com/GkKjjwy. They are still programmed as squares, but the light isn't emitted exactly like that (still coming from discrete areas, not points).

See also https://www.reddit.com/r/apple/comments/9fp1ty/did_you_ever_....

Things becomes less clear when you take supersampling into account. Samples may be taken in a quincunx pattern for instance.

But these samples are usually called fragments, not pixels. They turn into little square pixels later in the pipeline, so yeah, I guess that pixels really are little squares, or maybe little rectangles.

I don't remember the manufacturer (may have been Fuji[0]), but someone made a camera sensor that was laid out around a 45-degree angle.

[0] https://en.wikipedia.org/wiki/Super_CCD

There's also a hex-pattern camera sensor out there. It claimed to have better resolution without increased chip-printing cost (N pixels/area produced better effective visual resolution), but never took off.