Nick Massey on Thursday, November 5, 2009
Yesterday I decided to make a fun little program to generate Strange Attractors which are wacky fractal-like images which I'm sure have some complex mathematical explanation behind them but I just think they look pretty. Generating them was extremely trivial I all there is to it is the take x and y cords, perform a simple math operation on them, and draw a pixel at the result, then repeat that a few million times. I chose to use the Peter de Jong formula for generation attractors created with it tend to look really cool and varied and the formula is trivial so less work for me then.
Peter de Jong formula
It can take quite some time to generate high quality attractors so I have been just dumping out really low quality low resolution images until I find one that may look nifty and start it going at 36megapixels. It takes around 30 minutes for my craptop to dump one out but they end up looking sooo neat. Once generated my program applies a gradient map to it based on the brightness of each pixel, the map is just something I whipped up in a couple minutes in Photoshop to try and get the most detail showing though while keeping it looking good. Also I have made a couple animated
ones by generating it then changing one variable by like 1/100 and generating again then stringing them together, it does create a neat effect but there are noticeable flickers and it will dim and brighten so it does not work perfectly.
One of my Strange Attractors
In other news I was able to approximately double my NES emulators FPS, through some crazy window hyjinks and hacks. I can now run it at a respectable resolution and have it still be playable which is nice.