File: PreprocessorGUI.es

package info (click to toggle)
structure-synth 1.5.0-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,268 kB
  • ctags: 1,966
  • sloc: cpp: 10,209; python: 164; makefile: 71; sh: 15
file content (38 lines) | stat: -rw-r--r-- 768 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
	An example of using GUI preprocessor defines.

       The "float" suffix makes it possible to control variables via sliders.
       The 'int' suffix is identical to the above, but only accepts natural numbers.
*/

#define sizeStep 0.94 (float:0-1)
#define angle1 20 (float:0-90)
#define angle2 6 (float:0-90)
#define iterations 6 (int:1-90)


set maxdepth 100
set background black

iterations * { rx 10  x 0.2 sat 0.95  } R


rule R { 
set seed initial 
R1 
}

rule R1 {
  {  x 0.6 rz 0 ry angle1 s sizeStep hue 1 a 0.99 } R1
  { s 1 1  0.1  color green  } sbox
}

rule R1 {
  {  x 0.6 rz angle2 ry 0 s sizeStep hue 1 a 0.99 } R1
  { s 1 1  0.1  color red } sbox
}

rule sbox {
 { color black } grid
  {  b 0.8 hue 67 } box
}