TODO list and scratch pad for Structure Synth. /Mikael

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 SVN.

Minor changes and bug fixes:
- Added close icon to tabs.
- Applied more agressive 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.


Next version:
- Show hour-glass when making long operations (before progress when rendering...)    
- Better sphere implementation (remember transformation thing...)
- 

Request:
- Remember file extension.

Template Rendering Dialog:

Choose Template:
[Sunflow.template] [<]

(o) Render to file: [c:\testmig.es] [File...]
	[x] add unique ID to filename
( ) Render to clipboard.

Output Size:
X: 640 Y: 400. [x] Lock Aspect

[x] Modify Template before applying:
(changes to template are not saved on disk)

Post processing:
[x] Modify export before saving
[x] Run the following commands after export:
    C:\sunflow\sunflow.bat {File}







Make Debug moc'ing on release...

Debug.Info(...);
Debug.ShowProgress(...);
Debug.SetProgress(...);   // TODO: Should throw exception if cancelled...
Debug.HideProgress();
Debug.Message(...);

Builder.load(filename);
Builder.replace(before, after);
QString text = Builder.applyTemplate(...);
Builder.run();

IO.save(text, filename);
IO.spawnProcess(...);
IO.saveImage(filename); // For OpenGL output...

About box sizing on Mac.
Change 'mac.pro' -> 'StructureSynth.pro'
Check copy paste menu

Template Render Dialog
----------------------
Save file as:
Default file path: [...............] [Dir...]
File name: [Output0001.es] [File...]

Post processing:
[ ] Run the following command after saving picture.
    [C:\program files\Sunflow\Sunflow.bat {FILENAME}]
   
 Edit script before saving:
[                  ]
[                  ]
[                  ]
[                  ]




On startup -> show 3D view nav info...
Help -> add weblinks...

- Restructure: 
	-Check directory structure.
	-Comments
				
- Website: 
    - add section links.
    - tutorials: 'EisenScript Kata'

- JanJacobSV has some interesting 3D experiments with CFDG and Virtools. http://www.youtube.com/watch?v=KWgQ8XIPAio
	
- [Collada] Support? (http://www.khronos.org/collada/)

- VRML example (could be fun)







EisenScript
-----------

Structures are specified in EisenScript (named after the russian film director Sergei Eisenstein). 

EisenScript is processed by the Eisenstein Engine by the following steps:
1) Preprocessor (strips comments imports '#include' statements).
2) Tokenizer (divides string input into symbols. The string input is split at any white space (except if it occurs inside quotes).)  
3) Parser (standard recursive descent parser). The parser creates a 'ruleset' from the text input. 
4) Name resolving. Rules contain symbolic references to other rules. These symbols must be resolved.

The EBNF notation for EisenScript looks like this:

program = { set | rule } ;
rule = 'RULE' ,  rule_name , [ weight ] , '{' , { set | action } , '}' ;
action = { transformationloop } [transformationlist] rule_ref ;
transformationloop = number , '*' , transformationlist ;
transformationlist = '{' , { transformation } , '}';
transformation = 'X' , number |                      // translations
                 'Y' , number |
                 'Z' , number |
                 'RX', number |						 // rotation about axis
                 'RY', number |
                 'RZ', number |
                 'S', number |						 // resizing (all axis equal)
                 'S', number number number, 		 // resizing for x,y,z individually
                 
set = 'SET' , var_name , string ;

'rule_ref', 'var_name', and 'string' are text strings with a reasonable set of allowed characters.
Though not strictly a part of the syntax, a few rules are provided as predefined primitives in Structure Synth:

Primitives: 
-----------
box      - solid box
grid	 - wireframe box
sphere   - 
line     - along x axis, centered in y,z plane.
point    - centered in coordinate system.
cylinder - the symmetry axis will be the current x axis.
pbox     - continues box (will be drawn smoothly as the coordinate system transforms).
pcylinder- polygonal cylinder (will be drawn smoothly as the coordinate system transforms).
tube     - (With number of division)

