File: RandomColor.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 (43 lines) | stat: -rw-r--r-- 1,052 bytes parent folder | download | duplicates (6)
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
39
40
41
42
43
/*
A demonstration of random colors in Structure Synth

Use the 'color random' to select a random color.

There a different schemes for creating random colors:

'randomhue' - HSV color with random hue, max brigthness and saturation.
'randomrgb' - random R,G,B.
'greyscale' - random R=G=B.
'image' - samples a random pixel from the specified image
              the image must be located relative to the current path 
              (look at error message to see where Structure Synth tries to find the file.)
'list:xxx' - chooses a random color from the list.

*/

//set colorpool randomhue
//set colorpool randomrgb
//set colorpool greyscale
//set colorpool image:001.jpg
set colorpool list:red,orange,yellow,white,white


face 
{ rx 90 } face
{ ry -90 } face

rule face {
  10 * { x 1 } 10 * { y 1  } 1 * { x -1 y -1 } mybox
}

rule mybox {
   { rz 5 ry 5 s 1 1 0.1 color random } box
}

rule mybox {
   { rz 5 ry -5 s 1 1 0.1 color random  } box
}

rule mybox {
   { rz 5 rx -5 s 1 1 0.1 color random } box
}