Saturday, December 8, 2012

Purple Brains and software updates


I should point out that the software I made to make these pictures is has been posted to GitHub. Feel free to fork it. I'd be interested in seeing what other people can do with it and will happily merge in good pull requests.

http://github.com/benhardy/fractus

It's been a couple of years since I last posted an image, but I've been making occasional updates to the software since porting to Scala, and refactoring it in a more idiomatic functional style. There's still quite a bit of work to do there, but it's getting there.

In particular, the Brush classes' imperative loops are now gone. They are now not only much easier to understand but also bug free - there was a paint bleeding bug which disappeared after converting to a functional style. It's now much easier to reason about their correctness and to unit test them. I'm not sure as I haven't benchmarked it yet, but it seems to run faster too.

Anyway here's another sample, called Purple Brain. It's in the code. Enjoy.


No comments: