Skip to content

Instantly share code, notes, and snippets.

@cormullion
Created May 25, 2026 19:04
Show Gist options
  • Select an option

  • Save cormullion/5bd553b32431da583a515ab39c7397ac to your computer and use it in GitHub Desktop.

Select an option

Save cormullion/5bd553b32431da583a515ab39c7397ac to your computer and use it in GitHub Desktop.
gempa.jl logo
using Luxor
function drawtrace(pt)
@layer begin
M = 32 # size of masking holes
# create mask to hide trace in circles
box(BoundingBox(), :path)
# using global coordinates
circlepath(Point(-595, -6), M, action = :path, reversepath = false)
circlepath(Point(-460, -62), M, action = :path, reversepath = false)
circlepath(Point(-425, -125), M, action = :path, reversepath = false)
circlepath(Point(-390, -62), M, action = :path, reversepath = false)
clip()
translate(pt)
move(0, 0)
curve(Point(12, 0), Point(23, 0), Point(36, 0))
curve(Point(66, 0), Point(68, -58), Point(86, -58))
curve(Point(104, -58), Point(108, 85), Point(132, 85))
curve(Point(156, 85), Point(164, -182), Point(189, -182))
curve(Point(214, -182), Point(214, 181), Point(236, 181))
curve(Point(258, 181), Point(258, -7), Point(278, -7))
curve(Point(298, -7), Point(298, 94.025), Point(315, 94.025))
curve(Point(337, 94.025), Point(337, -85), Point(358, -85))
curve(Point(379, -87.975), Point(383, 45.025), Point(405, 45.025))
curve(Point(427, 45.025), Point(431, -18.975), Point(446, -18.975))
curve(Point(461, -18.975), Point(467, 0), Point(490, 0))
line(526, 0)
strokepath()
end
clipreset()
return true
end
function rendercircle(pt, darkmode)
return if ! darkmode
@layer begin
circle(pt, 32, :path)
fillpreserve()
sethue("white")
strokepath()
end
else
@layer begin
circle(pt, 28, :path)
fillpath()
end
end
end
function main(;
fname = "gempa-darkmode.svg",
darkmode = true
)
if darkmode
Drawing(1600, 450, fname)
sethue("white")
else
Drawing(1600, 450, fname)
background("white")
sethue("black")
end
origin()
setline(14)
drawtrace(boxmiddleleft() + (50, 0))
@layer begin
setline(6)
sethue(Luxor.julia_blue)
rendercircle(Point(-595, -6), darkmode)
sethue(Luxor.julia_red)
rendercircle(Point(-460, -62), darkmode)
sethue(Luxor.julia_purple)
rendercircle(Point(-390, -62), darkmode)
sethue(Luxor.julia_green)
rendercircle(Point(-425, -125), darkmode)
end
fontface("Montserrat-Bold")
fontsize(220)
texttrack("Gempa.jl", Point(-180, -15), -30, valign = :middle)
finish()
return preview()
end
main(fname = "/tmp/gempa-darkmode.svg", darkmode = true)
main(fname = "/tmp/gempa-lightmode.svg", darkmode = false)
main(fname = "/tmp/gempa-darkmode.png", darkmode = true)
main(fname = "/tmp/gempa-lightmode.png", darkmode = false)
@cormullion

Copy link
Copy Markdown
Author
gempa-lightmode gempa-darkmode gempa-lightmode gempa-darkmode

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