Last active
June 14, 2023 11:09
-
-
Save cormullion/dd500d4aed96758dd12aab2b649840d4 to your computer and use it in GitHub Desktop.
julia performance
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 main() | |
Drawing(500, 500, "/tmp/juliaperformance.svg") | |
origin() | |
squircle(O, 245, 245, :clip, rt=0.3) | |
sethue("ivory") | |
paint() | |
@layer begin | |
translate(0, 200) | |
rmin = 150 | |
rmax = 260 | |
band = 45 | |
setblend(blend(O - (240, 0), O + (240, 0), "white", "red")) | |
sector(O, rescale(4, 1, 3, rmin, rmax), | |
rescale(4, 1, 3, rmin, rmax) + band/2, | |
3π/2 - deg2rad(45), 3π/2 + deg2rad(45), :fill) | |
for n in 1:3 | |
sethue([Luxor.julia_green, Luxor.julia_red,Luxor.julia_purple, Luxor.julia_blue][n]) | |
sector(O, | |
rescale(n, 1, 3, rmin, rmax), | |
rescale(n, 1, 3, rmin, rmax) + band, | |
3π/2 - deg2rad(45), 3π/2 + deg2rad(45), | |
:fill) | |
end | |
sethue("white") | |
setline(25) | |
line(O, polar(400, deg2rad(290)), :strokepreserve) | |
setline(14) | |
sethue("black") | |
strokepath() | |
circle(O, 30, :fill) | |
end | |
squircle(O, 245, 245, :stroke, rt=0.3) | |
finish() | |
preview() | |
end | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks, on second thought I think it's a bit overkill for our use case. I already like the way this looks: JuliaCI/BenchmarkTools.jl#316