Skip to content

Instantly share code, notes, and snippets.

@gcr
Created April 30, 2012 03:31
Show Gist options
  • Select an option

  • Save gcr/2555221 to your computer and use it in GitHub Desktop.

Select an option

Save gcr/2555221 to your computer and use it in GitHub Desktop.
background{ b -.8 sat .1 hue 20 }
size { s 16 9 }
startshape pick
rule pick { CIRCLES{} }
rule pick 2 { daze{} }
rule pick { aura{} }
rule pick { pixels{} }
rule pick { crosshatch{} }
rule pick { snake{} }
# {{{ snake
rule snake {
SQUARE {s 16 9 sat 1 hue 40 b 1 }
ROLLER {r -45 y 1 sat 1 s 0.5 y 13 b 1}
}
rule ROLLER {
ROLLER {y -.5}
SNAKEYEL {|h 40 h 20}
}
rule ROLLER .007 {}
rule SNAKEYEL {
BOX {}
SNAKEYEL {x .1 h 0.01| }
}
rule SNAKEYEL .01 {
BOX {}
SNAKEYEL {x .1 h 0.01| r .5}
}
rule SNAKEYEL .01 {
BOX {}
SNAKEYEL {x .1 h 0.01| r -.5}
}
rule SNAKEYEL .005 { SNAKERED {|h -20}}
rule SNAKEYEL .0005 {}
rule SNAKERED {
BOX {}
SNAKERED {x .1 h -.01| }
}
rule SNAKERED .01{
BOX {}
SNAKERED {x .1 h -.01| r .5}
}
rule SNAKERED .01{
BOX {}
SNAKERED {x .1 h -.01| r -.5}
}
rule SNAKERED .01 { SNAKEYEL {|h 20}}
rule SNAKERED .0005 {}
rule BOX {
SQUARE {}
}
# }}}
# {{{ crosshatch
rule crosshatch {
crossrandrot {}
}
rule crosshatch {
manya { r 48 b 1 hue 24 sat .99 s 1.5}
manya { r 138 b 1 hue 24 sat .99 s 1.5}
}
rule crossrandrot {
crossrandrot { r 1 }
}
rule crossrandrot 0.01 {
manya { r 48 b 1 hue 24 sat .99 s 2}
manya { r 42 b 1 hue 24 sat .99 s 2}
}
rule manya { manyb{} manyb{} }
rule manyb { manyc{} manyc{} }
rule manyc { manyd{} manyd{} }
rule manyd { sticktree1{} sticktree1{} }
rule sticktree1 { sticktree2 { x -8 } }
rule sticktree1 { sticktree2 { x 0 } }
rule sticktree2 { sticktree3 { x 4 } }
rule sticktree2 { sticktree3 { x 0 } }
rule sticktree3 { stickmany { x 2 } }
rule sticktree3 { stickmany { x 0 } }
rule stickmany {
stick {}
stickmany {}
}
rule stickmany 0.1 {}
rule stick { stick { x 0.1 s 0.95 } }
rule stick { stick { x -0.1 s 0.95 } }
rule stick { stick { b -0.1 } }
rule stick { stick { b 0.1 } }
rule stick { stick { sat -0.01 } }
rule stick 0.1 {
SQUARE { s 0.1 100 }
}
# }}}
# {{{ circles
rule CIRCLES{
GRIDa{ x -8 y -8 b 1 sat .99 hue 24 }
CIRCLES{}
}
rule CIRCLES .001 {}
rule FUZZY_CIRCLE {
CIRCLE { a -0.8 }
FUZZY_CIRCLE { s 0.95 a -0.13 }
}
rule FUZZY_CIRCLE {
CIRCLE { a -0.8 }
FUZZY_CIRCLE { s 0.95 a -0.15 }
}
rule FUZZY_CIRCLE { FUZZY_CIRCLE { hue 0.01 } }
rule FUZZY_CIRCLE { FUZZY_CIRCLE { x 0.03 } }
rule FUZZY_CIRCLE { FUZZY_CIRCLE { x -0.03 } }
rule FUZZY_CIRCLE { FUZZY_CIRCLE { y -0.03 } }
rule FUZZY_CIRCLE { FUZZY_CIRCLE { y 0.03 } }
rule FUZZY_CIRCLE .001 {}
# One cell
rule GRIDf .1{
FUZZY_CIRCLE {}
}
rule GRIDf 2 { GRIDf{x .1} }
rule GRIDf 2 { GRIDf{x -.1} }
rule GRIDf 2 { GRIDf{y .1} }
rule GRIDf 2 { GRIDf{y -.1} }
rule GRIDf{
GRIDf{s 1.1}
}
rule GRIDf{
GRIDf{a -.13}
}
# Search tree
rule GRIDa{ GRIDb{ x 0 y 0 } }
rule GRIDa{ GRIDb{ x 0 y 16 } }
rule GRIDa{ GRIDb{ x 16 y 0 } }
rule GRIDa{ GRIDb{ x 16 y 16 } }
rule GRIDb{ GRIDc{ x 0 y 0 } }
rule GRIDb{ GRIDc{ x 0 y 8 } }
rule GRIDb{ GRIDc{ x 8 y 0 } }
rule GRIDb{ GRIDc{ x 8 y 8 } }
rule GRIDc{ GRIDd{ x 0 y 0 } }
rule GRIDc{ GRIDd{ x 0 y 4 } }
rule GRIDc{ GRIDd{ x 4 y 0 } }
rule GRIDc{ GRIDd{ x 4 y 4 } }
rule GRIDd{ GRIDe{ x 0 y 0 } }
rule GRIDd{ GRIDe{ x 0 y 2 } }
rule GRIDd{ GRIDe{ x 2 y 0 } }
rule GRIDd{ GRIDe{ x 2 y 2 } }
rule GRIDe{ GRIDf{ x 0 y 0 } }
rule GRIDe{ GRIDf{ x 0 y 1 } }
rule GRIDe{ GRIDf{ x 1 y 0 } }
rule GRIDe{ GRIDf{ x 1 y 1 } }
# }}}
# {{{ daze
rule daze { start{ s 10 } }
rule start {
thread { r 15 s 0.15 }
thread { r 15 s 0.15 }
thread { r 15 s 0.15 }
}
rule thread { dot { } thread2 { } }
rule thread { dot { } thread2 { r 060 } }
rule thread { dot { } thread2 { r 120 } }
rule thread { dot { } thread2 { r 180 } }
rule thread { dot { } thread2 { r 240 } }
rule thread { dot { } thread2 { r 300 } }
rule thread2 1 { thread { x 1 h 3 } }
rule thread2 0.06 { junction { x 1 h 3 } }
rule thread2 0.15 { shrink { h 3 } }
rule shrink 1 { thread { s 0.3333333333 } }
rule shrink 2 { tdot { } }
rule junction {
jdot { }
thread { }
thread { }
thread { }
}
rule junction 0.05 {
jdot { }
thread { }
thread { }
thread { }
thread { }
thread { }
thread { }
}
rule dot {
CIRCLE { s 0.9 b 0.9 a -.7 sat 1 }
}
rule dot 0.2 { dot { s 1.5 } }
rule jdot {
CIRCLE { s 0.9 b 0.9 a -.7 sat 1 }
CIRCLE { s 0.7 b 1 a -.7 }
}
rule jdot 0.4 { jdot { s 1.5 } }
rule tdot {
CIRCLE { s 0.7 b 0.9 a -.7 sat 1 }
}
# }}}
# {{{ aura
rule aura {
START__ { r 90 x -1.2 s .04 }
START__ { r -90 x 1 s .04 }
}
rule START__ {
START_ { r 90 }
START_ { y -100 r -90 }
}
rule START_ {
ARM { }
ARM { flip 180 }
}
rule ARM {
SHAPE { }
ARM { y 0.5 s 0.999 }
}
rule ARM 0.005 {ARM_ { }}
rule ARM_ {
SHAPE { }
ARM_ { y 0.5 s 0.999 r 45 }
}
rule ARM_ 0.005 {ARM { }}
rule SHAPE {
SQUARE { x -2 hue 24 b 1 sat .99 }
SQUARE { hue 28 b 1 sat .95 }
SQUARE { x 2 hue 24 b 1 sat .97 }
SHAPE { x 5 }
}
rule SHAPE {
CIRCLE { s 2 alpha -0.7 hue 20 b 1 sat 1 }
SHAPE { x 5 }
}
rule SHAPE 0.1 {
CIRCLE { s 30 alpha -0.95 hue 20 b 0.8 sat 1 }
SHAPE {}
}
rule SHAPE 0.5 { }
# }}}
# {{{ pixels
rule pixels { scale{r 3 b 1 sat .99 hue 24} }
rule scale{
makesquare{ x -1 y .5 }
scale2 { }
}
rule scale2 { scale { x 1 y 1 } }
rule scale2 { scale { x 1 y -1 } }
rule scale2 { scale { x -1 y 1 } }
rule scale2 { scale { x -1 y -1 } }
rule scale2 5 { }
rule makesquare{
SQUARE{ s -.1 }
makesquare{ y .1 a -.1}
}
rule makesquare{
SQUARE{ s -.1 y -1}
makesquare{ x .1 a .1}
}
rule makesquare{
SQUARE{ s -.1 y -1}
makesquare{ y -.1 a -.1}
}
rule makesquare{
SQUARE{ s -.1 y -1}
makesquare{ x -.1 a .1}
}
rule makesquare 0.001 {
makesquare { s 0.5 }
}
rule makesquare 0.001 {
SQUARE { s 10 a -0.9 }
makesquare {}
}
rule makesquare 0.0005 {}
# }}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment