Skip to content

Instantly share code, notes, and snippets.

@radamant
Created September 26, 2016 16:30
Show Gist options
  • Save radamant/c9f6b9e57125e2d0a4dd76e4eb98b3fb to your computer and use it in GitHub Desktop.
Save radamant/c9f6b9e57125e2d0a4dd76e4eb98b3fb to your computer and use it in GitHub Desktop.
CF::Background = [sat 0 b -0.95]
startshape field[sat 1 b 1]
color_start = 0..360
adjustment pick_color() = select(randint(8),
[h (color_start + 90) sat 0.8 b -0.8],
[h (color_start + 90) sat 0.9 b 0],
[h (color_start + 120) sat 0.8 b 0],
[h (color_start + 120) sat 0.8 b -0.8],
[h (color_start + 150) sat 0.8 b -0.8],
[h (color_start + 150) sat 0.9 b 0],
[h (color_start + 180) sat 0.8 b 0],
[h (color_start + 180) sat 0.8 b -0.8]
)
shape field {
loop 30 [x randint(-4,4) y randint(-4,4) ]
thing[trans pick_color()]
}
shape thing rule 30{
CIRCLE[]
length = randint(1,8)
SQUARE[x (length / 2) s (length) 0.15]
rotation = select(randint(6), 0, -90, 90, -180, 180, -270)
thing[x (length) r (rotation) ]
}
rule 1 { SQUARE[]}
rule 5 {
SQUARE[s 1.5..2 a -0.5]
thing[]
}
rule 2 {
SQUARE[s 0.5 x randint(-2,2) y randint (-2,2) r 45 sat 1 b 1]
thing[]
}
rule 2 {
SQUARE[s randint(2,3) z -1000 sat 1 b 1 a -0.5]
thing[]
}
@thesage1014
Copy link

ooh, the layering looks nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment