Procedural sprite generator in Matlab