Last active
March 17, 2017 17:13
-
-
Save cormullion/b9eeac0a03ea8bd8a818f81d19d24852 to your computer and use it in GitHub Desktop.
logo idea
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Luxor | |
function three_circles(cpos::Point, circle_radius; outercircleratio=0.75, innercircleratio=0.65) | |
fontface("Georgia-Bold") | |
fontsize(26) | |
# clockwise, from bottom LEFT... | |
points3 = ngon(cpos, circle_radius, 3, pi/6, vertices=true) | |
for (n, p) in enumerate(points3) | |
sethue(color_sequence[n][1]...) | |
circle(p, outercircleratio * circle_radius, :fill) | |
sethue(color_sequence[n][2]...) | |
circle(p, innercircleratio * circle_radius, :fillpreserve) | |
clip() | |
gsave() | |
translate(p) | |
tiles = Tiler(2circle_radius, 2circle_radius, 8, 8) | |
sethue("white") | |
for (pos, n) in tiles | |
setopacity([0.25, 0.5, 0.75, 1.0][rand(1:end)]) | |
text("[ ]", pos, halign=:center) | |
end | |
grestore() | |
clipreset() | |
end | |
end | |
const darker_purple = (0.584, 0.345, 0.698) | |
const lighter_purple = (0.667, 0.475, 0.757) | |
const darker_green = (0.22, 0.596, 0.149) | |
const lighter_green = (0.376, 0.678, 0.318) | |
const darker_red = (0.796, 0.235, 0.2) | |
const lighter_red = (0.835, 0.388, 0.361) | |
const color_sequence = [(darker_red, lighter_red), | |
(darker_green, lighter_green), | |
(darker_purple, lighter_purple)] | |
function draw_logo_arrayed(fname) | |
Drawing(500, 500, fname) | |
origin() | |
circle(O, 245, :clip) # clip to circle | |
background("white") | |
three_circles(O, 135) | |
clipreset() | |
finish() | |
preview() | |
end | |
draw_logo_arrayed("/tmp/collectionslogo.png") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Putting some randomness back.