First
ddds


(400x390, 10.9 Kbytes)
Rate it
 Poor     Fair     Good     Very good     Superb!   
Source code
width = 400
height = 400

//initial values:
s = 30  //size
b = 220 //brightness (0..255)
r = 0   //rotation angle (0..360 degrees)
c = 0   //color (0..255)
t = 200 //saturation (0..255)
a = 0   //alpha channel (0 = opaque to 255 = transparent)
n = 70  //nesting: max. level of recursion

startshape FIRST  //start with this rule

rule FIRST {
  BRICK  //without parameters, parentheses may be omitted
  //parameters may be contracted to 1st letter, e.g. 's' for 'size'
  BRICK {r 72 c 51}
  BRICK {r 144 c 102}
  BRICK {r 216 c 153}
  BRICK {r 288 c 204}

  //absolute values are also supported now.
  //Put '=' sign before a value:
  CIRCLE {s =45 t =0 b =200}
}

//probabilities (rules weightings) are supported (0..1):
rule BRICK 0.5 {
  SQUARE
  BRICK {r -20  x 1.3  s 0.9  b -0.1}  //'b': brightness (-1..+1)
}

rule BRICK {
  SQUARE
  BRICK {r -20  x 1.3  s 0.9  b -0.1}
}


<< Back