Alan Wolfe, a game and graphics programmer, writes about random numbers, blue noise, Monte Carlo methods, floating point, and automatic differentiation.
HN commenters link it to explain low discrepancy sequences and blue noise sampling in graphics, and one lists it among math-focused blogs.
Some notes because I weirdly just went through almost the exact same project for work:
* I also started with an RP2040 because the PIO is such a good Swiss Army knife for working with custom digital protocols. An RP2040 with a faster USB PHY would be killer!
* The STM32U5 series has variants with built-in High Speed USB PHYs, along with 2.5 megabytes of SRAM, along with easily solderable footprints (down to LQFP64) if you want to solder at home instead of having a PCB fab do it.
* JLCPCB and/or PCBWay can assemble boards for quite cheap these days
* ESD protection would be good to add to the board, as others have noted and as you mention in the post
* Ideally all routed traces which have fast rise/fall times (most digital signals) should have a solid reference plane under them along the entire trace, to avoid cross-talk and EMI, along with vias for your reference plane if your signal changes layers.
* If you control the rendering, and color banding is still an issue, look into Interleaved Gradient Noise
* I hadn't heard of GUD before. I just made a simple USB Bulk Out endpoint in the firmware and in my application code, took less than a day. Sometimes a custom solution is quicker and easier but it depends on where it's running and who you're distributing it to. Obviously my custom solution isn't interoperable with other things, but for now it doesn't need to be.
I plan to write up a blog post on the project I worked on, I'll be sure to post it to HN when I…
Here are a bunch of blogs from my RSS reader that I think are worth reading. Some of them haven't updated in a while, but the archives may be worth a look anyway.
* Blogs with a math focus:
http://blog.sigfpe.com
http://bit-player.org
http://mathr.co.uk/blog/
https://www.johndcook.com/blog/
* Blogs with a programming languages focus:
https://existentialtype.wordpress.com
https://bluishcoder.co.nz
http://blog.ezyang.com
http://akkartik.name
http://lambda-the-ultimate.org
http://mrale.ph
* Blogs with a UI design focus:
http://www.brandonwalkin.com/blog/
http://ignorethecode.net/blog/
http://interuserface.net
* Blogs with a graphics / 3D rendering focus:
http://c0de517e.blogspot.com
http://diaryofagraphicsprogrammer.blogspot.com
https://directtovideo.wordpress.com
http://graphicrants.blogspot.com
http://www.reedbeta.com
http://www.realtimerendering.com/blog/
https://blog.demofox.org
http://eelpi.gotdns.org/blog.wiki.html
* Other interesting / more general programming blogs (many of these have a "systems" focus):
http://danluu.com
http://ewontfix.com
http://chneukirchen.org/blog/
http://neverworkintheory.org
http://apenwarr.ca/log/
https://www.snellman.net/blog/
https://www.pvk.ca
http://psy-lob-saw.blogspot.com
https://randomascii.wordpress.com
http://fastcompression.blogspot.com
https://fgiesen.wordpress.com
http://blog.plover.com
http://chneukirchen.org/trivium/
http://rachelbythebay.com/w/
Curious to see whether more recent dithering approaches would produce better results. They don't even have to be more resource hungry than the classic Bayer or Floyd-Steinberg dithers!
Interleaved Gradient Noise[0][1][2] comes to mind as an alternative to Bayer, and it can even be approximated quite well with just 8-bit operations! Basically, use the following function to determine your threshold based on pixel position: (x, y) => (142 * x + 79 * y) & 255
And for error diffusion, there are the Ostromoukhov and Zhou-Fang dithering algorithms[3][4], which I also have an JavaScript implementation of on Observable, so you can try it live[5].
[0] http://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare
[1] https://bartwronski.com/2016/10/30/dithering-part-three-real-world-2d-quantization-dithering/
[2] https://blog.demofox.org/2022/01/01/interleaved-gradient-noise-a-different-kind-of-low-discrepancy-sequence/
[3] https://perso.liris.cnrs.fr/victor.ostromoukhov/publications/publications_abstracts.html#SIGGRAPH01_VarcoeffED
[4] https://dl.acm.org/doi/abs/10.1145/1201775.882289
[5] https://observablehq.com/@jobleonard/variable-coefficient-dithering
Contrary to popular belief, perhaps we are not yet ready for fuzzy logic-based mathematics†. Like asking that does Boolean logic do in the 13th century, before Leibniz had any glimpse of characteristica universalis [1] (software, as opposed to calculus ratiocinator, hardware). If cryptocurrencies are solutions in search of a problem, fuzzy logic, and especially fuzzy dual numbers logic [2] [3] [4], doesn't even know it is a solution.
† one speculative use would be to assign degrees(?) of agency, some kind of a future unit of measurement: a person can be 100% evolved, or maybe 49% evolved and 51% designed (prosthetics, neural implants, and so on).
[1] https://en.wikipedia.org/wiki/Characteristica_universalis
[2] 2017, Fuzzy Dual Numbers: Theory and Applications, https://dl.acm.org/doi/book/10.5555/3172931
[3] "Fuzzy Dual Dynamic Programming", https://hal-enac.archives-ouvertes.fr/hal-01372543/document
[4] "Dual Numbers & Automatic Differentiation", https://blog.demofox.org/2014/12/30/dual-numbers-automatic-differentiation
This paper does a weird thing by introducing complex numbers and then presenting a code solution that effectively implements dual numbers [0] while still calling them complex:
"The new version of the complexify module has
been improved by using the new function definitons discussed in the previous section, i.e., definitions that use the original real function for the real
part and the derivative of the function multiplied by
h for the imaginary part, rather than the complex
function definition." (emphasis mine)
Dual numbers ( "a + bE", where E [usually small epsilon] is a symbol defined by E^2=0, but E itself doesn't equal 0) are perfectly suited for automatic differentiation [1,2], so this paper is accurate. I just think it's confusing, probably especially for someone new to the topic, to kind of conflate dual and complex numbers in this way.
[0] - https://en.wikipedia.org/wiki/Dual_number
[1] - https://github.com/JuliaDiff/DualNumbers.jl
[2] - https://blog.demofox.org/2014/12/30/dual-numbers-automatic-differentiation/
One reason to use Blue noise in graphics / games / images is anytime you need a random number per pixel for, say, some Monte Carlo process, that will have a visible effect on the image and result in visible noise in the output. Using blue noise, the output will be visibly less “noisy” looking than when using white noise, due to blue noise having no low frequencies.
Blue noise is best for situations where you only have the budget for 1 or 2 samples per pixel. The very low sample counts is where it performs considerably better than white noise. If you integrate with many samples, tens or hundreds or more, then the advantage of blue noise over other “colors” diminishes.
The author of this post has some examples in other articles on his blog, for example using blue noise vs white noise for ray traced soft shadows. https://blog.demofox.org/2020/05/16/using-blue-noise-for-raytraced-soft-shadows/