Hacker News new | past | comments | ask | show | jobs | submit login

Sure it is, it's the first thing to be said just after the title and widgets

> This article is about aliasing in signal processing, including computer graphics.

In computer graphics, the relevant aliasing is spatial aliasing, in fact mentioned in the article: the signal is the fundamental shape (such as a font glyph or a triangle mesh or whatever), and the samples are the pixels.

In the specific application of a waveform, a typical "CD quality" audio file has 44.1 thousand samples per second, and say, 16 bits per sample. If we want to display the waveform of one second of audio horizontally on an entire standard low-density full HD computer screen, we have 1920 samples to fit our 1 second of audio data, and 1080 samples of amplitude with which to paint the amplitude.

Putting it into signal processing terms, The signal frequency here is 44.1Khz, and the sampling frequency is 1.92Khz. Do you see how aliasing applies now? We want to represent f_Signal / f_Sample = 22.96875 samples of audio with 1 sample.

In practice you get an even worse ratio, because we usually want more than 1 second of waveform to be visible on a region that isn't the entire screen.




> the signal is the fundamental shape (such as a font glyph or a triangle mesh or whatever)

No. The signal components being aliased are frequencies e.g. repeating patterns.

"aliasing is the overlapping of frequency components resulting from a sample rate below the Nyquist rate."

That is why the example is a brick wall and the result is moire banding. Nothing like your shapes and jaggies.

What you've mistaken for aliasing is simply pixellation.


These are the same thing. A shape with a solid boundary is a a signal with a discontinuous step: If you Fourier it, it has infinite nonzero terms, therefore you can't represent it exactly with any finite amount of frequencies, and therefore a finite amount of samples.

In the case of Moiré patterns in pictures, we have lines in the real world that need to fit into pixels that fit a larger area than the Nyquist rate of those lines. The Moiré effect in pictures is just the interference pattern caused by this aliasing.

If you look at just a column of the image, and imagine the signal as being the brightness varying over the Y coordinates, you can imagine the mortar being an occasional regular pulse, and when your sampling rate (the pixel density) isn't enough, you get aliasing: you skip over, or overrepresent, the mortar to brick ratio, variably along the signal.

https://imgur.com/a/BiZcxG5

Now if you look at the graph in that picture, doesn't that look awfully similar to what happens if you try to sample an audio file at an inferior rate for display purposes?

In fact, try it right now, download Audacity, go to Generate>Tone, click OK with whatever settings it's fine, press Shift+Z to go down to sample level zoom, then start zooming out. Eventually, you'll see some interesting patterns, which are exactly the sort of aliasing caused by resampling I'm talking about:

https://i.imgur.com/bX2IFp8.png


> you'll see some interesting patterns, which are exactly the sort of aliasing caused by resampling I'm talking about

I see this and agree. This is true aliasing. I believe this is the OP's "super aliased" look.

However I disagree that this is "the same thing" as the jaggies that can be avoided by more colours.

This cannot be avoided by more colours. It can be avoided only by increased resampling rate.


How do we add more colours (besides just picking a random colour, which wouldn't be helpful)?

By sampling the signal more often ("multi-sample anti aliasing"), also known as increasing the resampling rate, then representing that with a wider bit depth (not just 1 bit "yes/no", but multiple bits forming a color/opacity), since we do have more than 1 bit per pixel that can be used already.

I'll give it to you that this is "anti aliasing", not "not having aliasing in the first place", but the Fourier argument above is the reason why in computer graphics we practically always have to "settle for" AA instead.




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

Search: