Structure Synth 0.9.5 (“Haiku”) Released

A new version of Structure Synth has been released. It has several new features.

New commands

First of all a new system for generating random colors has been created – it is possible to use multiple palettes, including sampling colors from bitmap pictures. This was covered in a previous blog post.

The EisenScript has been extended with a few other commands: It is now possible to terminate the structure building when a given state reaches either a minimum or a maximum size. A new color blend operator was also introduced.

(The new color blending operator)

The new set seed initial command is also a very interesting addition: this makes it possible to combine randomness with self-similarity.

(Example of a random system, but with fractal properties)

Structure Synth now also supports drag’n'drop of EisenScript files onto the GUI. It is also possible to pass an EisenScript file as an argument to Structure Synth from the command line (this also makes file associations possible).

Licensing and packaging

A new license option is now available for Structure – previously the only option was GPL, but now Structure Synth is dual licensed under both the LGPL and GPL license. This was made possible, after Nokia acquired Trolltech and changed the Qt open-source licensing. I really think this is a wise move by Nokia – it will certainly speed the adoption of this excellent API. The LPGL makes it possible to use Structure Synth functionality in commercial and/or closed-source applications (e.g. VVVV integration would now be a possibility).

The examples and the export templates have also been cleaned – and new SunFlow templates by Neon22 and Groovelock have been added. Also a Blender importer by David Bucciarelli has been added. The PovRay exporter has also been restored.

Finally, Miriam Ruiz has begun creating Ubuntu and Debian packages for Structure Synth. Once approved they should be easily available on these platforms too.

Release Notes

Structure Synth 0.9.5 (“Haiku”) Released

Binaries for XP and Vista.
Mac binaries will hopefully be available soon.
Linux is still source only.

New features:

  • New color features: a ‘random color’ operator with different palettes (random hue, random rgb, greyscale, sampling from image, or from user-defined list).
  • Now uses two independent (Mersenne Twisters) random number generators: one for geometry and one for colors.
  • Upgraded to Qt 4.5.0. Now Structure Synth is dual licensed under GPL and LGPL.
  • Added ‘blend {color} {strength}’ operator.
  • Added ‘set seed initial’ for syncing random seed.
  • Added ‘set maxsize …’ and ‘set minsize …’.
  • Added support for specifying a startup .es file on the Commandline (this makes file associations possible).
  • Added support for drag’and’drop (drop a .es file onto the clipboard).
  • Added simple GUI for manipulating preprocessor defines.
  • Added templates by Neon22 and Groovelock to the distribution.

Minor changes and bug fixes:

  • Added close icon to tabs.
  • Applied more aggressive optimization on Windows build (SSE2/fast fp-math). SSE2 is now required!
  • Fixed a bug where a recursive rule (not producing objects) could fill memory.
  • Added export of background color to templates.
  • BugFix: The scrollwheel can now be used to zoom again.
  • PovRay template export has been restored. The Camera export still needs some work, but it should be usable again.

Download from:

SourceForge.net

Random Colors, Color Pools, and Dual Mersenne Twister Goodness.

I’ve implemented a random color scheme in Structure Synth, using a new ‘color random’ specifier.

But what exactly is a random color? My first attempt was to use the HSV color model and choose a random hue, with full brightness and saturation.

This produces colors like this:

Most of my Nabla pictures used this color scheme. It produces some very strong colors.

Then I tried the RGB model using 3 random numbers, one for each color-channel, which creates this kind of colors:

But what about greyscale colors:

I decided that it was necessary to be able to switch between different color schemes.

So I created a new ‘set colorpool’ command. Besides the color schemes above (‘set colorpool randomhue’, ‘set colorpool randomrgb’, and ‘set colorpool greyscale’) I created two additional color schemes:

One where you specify a list of colors:

(For this image the command was: “set colorpool list:orange,white,white,white,white,white,white,grey”. As is evident it is possible to repeat a given color, to emphasize its occurrence in the image.)

And on where you specify an image which is used to sample colors from:

The command used for the above image was: “set colorpool image:001.PNG”. Whenever a random color is requested (by the ‘random color’ operator), the program will sample a random point from the specified image and use the color of this pixel. This is a quite powerful command, making it possible to imitate the color tonality of another picture.

Now this is all good. But I realized that there are some problems with this approach.

The problem is that geometry and the colors draw numbers from the same random number generator (the C-standard library ‘rand()’ function).

This means that changing the color scheme changes the geometry (since the color schemes use a different number of random numbers for each color – randomhue uses 1 random number per color, the image sampling uses two (X and Y) random numbers per color, the randomrgb uses three).

This is not acceptable, since you’ll want to change the color schemes without changing the geometry. Another problem is that C-standard library ‘rand’ function is not platform independent – so even if you specify a EisenScript together with an initial random seed, you will not get the same structure on different platforms.

I solved this by implementing new random generators in Structure Synth. I now use two independent Mersenne Twister random number generators, so that I have two random streams – one for geometry and one for colors.