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

The min/max solution doesn't prevent aliasing. Consider that if you do manage to avoid aliasing, you'll be rendering something visually akin to a downscaled version of a fully-detailed, high-resolution plot of the waveform.



It renders a waveform that looks very similar to what it would look like if you drew a line between all points. If you have 100 samples per pixel and you draw lines between all of them, you'll essentially end up with a filled area that goes from the lowest sample to the highest. So practically the same thing as just taking the min and max and then filling everything in between. The advantage is that you're avoiding all those lines in between. If you zoom it, the signal changes very smoothly without those aliasing effects where peaks appear and disappear. The web demo currently doesn't allow zooming in, so you can't test it there, but if you download the whole Samplab app (https://samplab.com/download), you can try out what it looks like when zooming in.


A great explanation.


Min/max does prevent the "super aliased" result in question. I'd agree it leaves a little aliasing.




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

Search: