Skip to content

Instantly share code, notes, and snippets.

@cormullion
Last active January 26, 2019 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cormullion/c2bd822b4ce5ac22bb5e12fbc4fee140 to your computer and use it in GitHub Desktop.
Save cormullion/c2bd822b4ce5ac22bb5e12fbc4fee140 to your computer and use it in GitHub Desktop.
splash image
using Luxor
Drawing(1920, 525, "/tmp/splash-img.png")
setblend(blend(boxtopcenter(BoundingBox()), boxbottomcenter(BoundingBox()),
setcolor(.3, .34, .5, 0.7),
setcolor(.1, .1, .15, 0.9)))
paint()
origin()
sethue("grey50")
setline(.25)
rule.([Point(x, 0) for x in -1920/2:15:1920/2], pi/2)
rule.([Point(0, y) for y in -525/2:25:525/2], 0)
sethue("grey90")
rule.([Point(0, y) for y in -525/2:100:525/2], 0)
A1, A2 = 3, 70
k1, k2 = 5, 2
stepping = pi/80
rawsinecurve = [Point(1920/2pi * x, A1 * sin(k1 * x) * A2 * sin(k2 * x)) for x in -2pi:stepping:2pi]
setdash("solid")
dots(pt) = begin
sethue("lightgoldenrod")
circle(pt, 3, :fill)
sethue(.20, .26, .47)
circle(pt, 2.75, :fill)
end
setline(4)
randomhue()
dots.(polysample(rawsinecurve, 600, closed=false)) # on master
finish()
preview()
@cormullion
Copy link
Author

splash-img

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