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 }
}
paintsplash
Moderators: MtnViewJohn, chris, mtnviewmark
- MtnViewJohn
- Site Admin
- Posts: 882
- Joined: Fri May 06, 2005 2:26 pm
- Location: Mountain View, California
- Contact:
That's cool. Here is a useful idiom for setting a random color or rotation:
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.
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 }
}