Page 1 of 1

paintsplash

Posted: Sun Aug 07, 2005 5:25 pm
by matthewstokeley
hey what's up this is my first cfdg, looks kind of like a paint splash i guess? i wish i could make things that weren't soo abstract but uuuuuuuh yea

startshape tree

rule tree {
SQUARE { }
tree {
y 5
s 0.6 1}
}

rule tree .5 {
tree { r 45 }
tree { r 45 }
}

Posted: Mon Aug 08, 2005 8:44 am
by MtnViewJohn
That's cool. Here is a useful idiom for setting a random color or rotation:

Code: Select all

startshape splat

rule tree {
	SQUARE { }
	tree {
		y 5
		s 0.6 1}
}

rule tree .5 {
	tree { r 45 }
	tree { r 45 }
}

rule splat 5 { splat { hue 43 }}
rule splat 2 { splat { hue 17 }}
rule splat 1 { splat { hue  7 }}
rule splat 0.5 { 
	tree { sat 0.8 b 0.9 }
}
Context Free will evaluate splat rules at random, doing a hue space rotation each time, until it hits the bottom rule and jumps to the tree shapes. You can replace 'hue' with 'r' to do a random rotation.