Created
July 16, 2023 16:14
-
-
Save cormullion/fb422d52affe248931f6912ea9616dd7 to your computer and use it in GitHub Desktop.
a propeller icon
This file contains hidden or 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, Colors | |
function blade(θ, n) | |
@layer begin | |
rotate(θ) | |
move(Point(46, 3.693)) | |
curve(Point(147.98, -101.378), Point(366.389, 35.292), Point(240, 145)) | |
curve(Point(43, 316), Point(107, 16), Point(46, 3.693)) | |
sethue(Colors.JULIA_LOGO_COLORS[mod1(n - 1, end)]) | |
fillpath() | |
end | |
end | |
function frame(scene, framenumber) | |
squircle(O, 290, 290, :clip, rt = 0.2) | |
background("black") | |
translate(25, 10) | |
for i in 1:3 | |
blade(π / 6 + 2π / 3 * (i - 1), i) | |
end | |
sethue("black") | |
circle(O, 80, :fill) | |
sethue(Colors.JULIA_LOGO_COLORS.blue) | |
circle(O, 60, :fill) | |
sethue("black") | |
circle(O, 30, :fill) | |
sethue("white") | |
fontface("JuliaMono-Regular") | |
fontsize(60) | |
if isodd(framenumber) | |
text("✓", halign = :center, valign = :middle) | |
else | |
text("x", halign = :center, valign = :middle) | |
end | |
end | |
function main() | |
amovie = Movie(600, 600, "fan") | |
animate(amovie, | |
Scene(amovie, frame, 1:2), | |
framerate = 1, | |
creategif = true, | |
pathname = "/tmp/fan.gif") | |
end | |
main() |
Author
cormullion
commented
Jul 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment