A place to keep track of blog posts I’d like to do:

**Chebyshev curve fitting / interpolation** – with simple working c++ code. Possibly rational chebyshev too. Chebyshev apparently is optimal for polynomial interpolation.

https://www.embeddedrelated.com/showarticle/152.php

**Optimistic concurrency (in databases)**. Select data and version id per row. Update versionid = versionid+1, blah where blah and version id = version id. If rows affected is 0, that means something else beat you to the punch and you can deal with it however.

**Cordic math**. Every iteration in a loop gives you another bit of precision, since it’s basically a binary search.

**2D SDFs for vector graphics** – using modulus for “free repeating”. anti aliasing. use your shadertoy verlet physics game as an example?

**Verlet Physics** Keep last and current position to get implicit velocity. Simulate. Iterative constraint solving. Things “just work” pretty well.

**Minkowski Portal Refinement** A nice & simple algorithm for collision detection. Maybe talk about algorithm to get depth. Mention JGK, possibly do that after.

**Deterministic Simulations** using deterministic sim to eg decrease network traffic.

**Quick Math: phi / goden ratio** show how golden ratio conjugate is the same number past the decimal point. show how this is the only number that can do that. The main point being “i remember this fact, but don’t remember the number”. This fact lets you calculate the number.

**Quick math: eulers constant** show how e^x being the derivative (and integral) can only work for e. The main point being “i remember this fact, but don’t remember the number”. This fact lets you calculate the number.

**Ear clipping** – for turning polygons into triangles. extendable to 3d with tetrahedron clipping, and to higher dimensions as well.

**Storageless Shuffle With Weights** – this is like if you have 3 red marbles and 5 blue marbles, how would you use FPE to storagelessly shuffle them.

**Recurrent neural networks (etc) for “time series” learning** – https://twitter.com/Peter_shirley/status/1066832031043149824?s=03

**Markov Chain Monte Carlo – Eg. for decryption** maybe try 2nd order or higher chains.

Maybe also try with rendering / numerical integration http://statweb.stanford.edu/~cgates/PERSI/papers/MCMCRev.pdf

**Blue Noise AO** – It’s common to use white noise for sampling and also sample rotation. Start from there and show how to use blue for sampling and also rotation!

https://learnopengl.com/Advanced-Lighting/SSAO

http://john-chapman-graphics.blogspot.com/2013/01/ssao-tutorial.html

**Other blue noise usage cases** – specific usage cases with easy to follow implementations

* fog shafts

* shadows (pcf)

* reflections

* dithering

**Data Cache** When doing coding experiments, there are often pieces of data that take time to calculate that are based on parameters that don’t often change from run to run. Making a data cache can help. Semi compelling usage cases: 1) next largest prime greater than N. 2) integrate a bilinear function. Compare / contrast to content addressable storage. CAS is the hash of the contents, this is the hash of the params that make the contents. code: https://github.com/Atrix256/ProgressiveProjectiveBlueNoise/blob/master/cache.h

**Magic Eye Implementation** turn a generic depth buffer into magic eye?

https://steemit.com/steemit/@mynameisbrian/how-to-create-a-steemit-themed-magic-eye-image-using-photoshop

Paul Malin’s shadertoy: https://twitter.com/P_Malin/status/1084251862893817865?s=03

**Exposure and fstops**

exposure is a multiplication. fstops are 2^(stop). feels linear when using fstops. must do multiplication in linear space, else is wrong (show it’s wrong).

**Reaction Diffusion aka Turing patterns**

https://en.wikipedia.org/wiki/Turing_pattern

https://www.quantamagazine.org/ancient-turing-pattern-builds-feathers-hair-and-now-shark-skin-20190102/

**Kalman Filter**

https://home.wlu.edu/~levys/kalman_tutorial/

# Audio Stuff

Biquad – a better frequency filter

Compressor & Limiter – automatic volume adjustment to eg avoid clipping. Include “side chain” stuff.

**Statistical Search**

Binary search works the way it does because it doesn’t know anything about the sorted list.

If you knew the min and the max in that sorted list, you could take a better guess at where to look first by finding the % that the value you are searching for is between min and max, and start at that % in the list.

The problem with that though is that it assumes an even distribution of numbers. If you have a bunch of small numbers and one huge number, this guess won’t be any good.

So, idea… if you fit the sorted list with some low order monotonic polynomial, you could reverse that to get an initial guess.

You could also update your best guess as to where the number was each time you looked in a place and got something that wasn’t your search value. This maybe using a kalman filter?

**Faster 1d blue noise generation **

1) brute force

2) binary search

3) linear search from initial guess from fit

4) kalman filter?

Use this stuff in generic data lists, not just in blue noise?

Maybe also a fixed # of buckets to cut search down. basically generate multiple in parallel and then append them together (but neighbors across edges do matter!)

james would…

I’d probably just put put uniform buckects

instead of a sorted array of numbers I’d try keeping the numbers ordered like a heep, then binary search is super faster, since it no longer suffers from non locality of memory access

an implicit binary tree where the childeren of a[i] are at a[i2+1] and a[i2 + 2]