Color Temperature and Recursive Midpoint Displacement

I just uploaded a couple of new patterns to the library. First,

  • UtilityColorTemp.epe

is a small utility that converts color temperature to RGB over the range 1000k-6000k in a fairly efficient way. Might be useful for anybody whose pixelblaze is occasionally used for “normal” room lighting. I’m using it to make a high tech, completely overfeatured lighted bathroom mirror for my wife.

The other one… Jeff’s Perlin/Simplex Noise generator got me thinking about what other fractal-ish things I might do to make organic looking “plasma” effects.

  • MidpointDisplacement1D.epe

uses a recursive midpoint displacement algorithm to generate a 1D heightmap which is then animated by “climbing” the gradient with hue. It’s fast – it takes 10s of milliseconds to generate a map at maximum recursion depth, and it doesn’t use much memory. It uses the new UI sliders (thanks, Wizard!!) to control map generation and animation, and can produce a wide variety of effects.


Hey, I checked out the Midpoint Displacement 1D pattern - really nice! It runs at like 200FPS rather than 80 for the 1D Perlin!

Easy to follow the code as well - it’s much simpler then the Perlin stuff. Thanks for my new go-to 1D gradient noise!

Thanks for taking a look! I thought your Perlin noise generator was quite beautiful, and it gave me a big kick in the seat of the pants in terms of how much work you can actually get a Pixelblaze to do.

Also, thanks for seeing past the unprepossessing title – it didn’t occur to me 'till later that simply calling it “Midpoint Displacement” doesn’t exactly scream, “Hey, cool graphics” to most folks.