Assorted knitters that I know seem to like to do Work In Progress posts, whereas I never do, for two reasons. The first is that I doubt my ability to do anything, hence I don’t want to jinx it by talking about it. Case in point – Patrick is doing some 3D printing for me. I posted a progress picture, the printer promptly blew up. The second is that I like to things that haven’t been done before. Said thing may not have been done before because I’m trying to do something impossible. Thus I may well be in the state of being about to discover that what I want to do can’t be done and if I’ve told people I’m going to do it, then egg meets face.
And let’s face it, if some random nutter comes up to you at a festival and starts going “yeah, I’m gonna make this thing, it’ll be better than all the other things that have ever been done before, it’s going to be awesome”, then you’re generally going to go “yeah, right, show me the money”. So I don’t want to be that guy.
Nevertheless, I should get over myself. Thus I’m getting out of my comfort zone here by sharing some WIP. But hey! I’m pushing the boundaries and living life on the edge! Danger is my middle name. (Actually, my full name is Happyin Danger Roaring Lethal Molybdenum Balloon Motion, but that’s another story.)
So… here’s some code that I plan to put in the Mitochondrion, Mark 4. I want the Mark 4 to have some ambient/screensaver modes so that when I’m not spinning it, it’s still doing something visually interesting. One simple mode is a slow colour change. I could just loop through red-green-blue like every other bugger on the planet, but nah. So if I’ve got 16 million colours, then I want to use them all, without repeats, and with very gentle, barely noticeable colour changes. Hence there was an immense amount of code written trying to generate smooth paths spiraling through RGB colourspace and … none of it looked right. So in the end, I just said bugger it and wrote four lines of code that randomly walk up and down red, green, and blue. Yeah, sometimes simplest is best.
LJ doesn’t let me embed a Processing sketch, but if you really need to see a square changing colour slowly, then it is.
And if I want to do this at a mellow brightness, then I’ve got a problem. This kind of colour transition looks crap with less than 6 bits (64 brightness levels) for each colour. If I’m using 8-bit drivers, then I’ve 255 brightness levels from off to OMFG, and level 64, (i.e. one quarter of full whack) is too bright to be mellow. Anything over 16 brightness is excessively bright, but then that only gives 16 brightness levels to play with, which makes colour transitions too notchy. So really, I need at least 10 bits of brightness control with, from hardware which will only do 8. Current plan is to try to fake the two extra bits in software, but we’ll have to see if the Mark 4 has enough grunt.