PropCheck.jl
PropCheck.jl copied to clipboard
PropCheck Logo
I saw a conversation on Discourse about a logo for a PropCheck package badge. I'd been meaning to try my hand at some Luxor.jl, and thought this might be a good way to learn. No sweat if it isn't want you're looking for, just wanted to share in case it is helpful to you:
The code to generate
using Luxor
avg(x,y) = (x+y)/2
function parabolic_ish(start::Point, vertex::Point, stop::Point)
curve(
Point(start.x, avg(start.y, vertex.y)),
Point(avg(start.x, vertex.x), vertex.y),
vertex
)
curve(
Point(avg(vertex.x, stop.x), vertex.y),
Point(stop.x, avg(stop.y, vertex.y)),
stop
)
end
@draw begin
background("black")
inner_r = 50
space = 40
total_r = inner_r + space
blade_base_w = 40
half_w = blade_base_w / 2
blade_x_start = sqrt((total_r)^2 - (half_w)^2)
blade_len = 380
max_drag = 100
inner_curve_w = ((blade_len - blade_x_start) / 2.3) + blade_x_start
inner_curve_midpoint = avg(inner_curve_w, blade_x_start) * 1.1
blur_curve_mid_x = avg(inner_curve_w, blade_len)
colors = ("purple", "red", "green")
rotate(π/6)
for i in 1:3
sethue(colors[i])
move(Point(blade_x_start, -half_w))
# outer curve of the blade
curve(
Point(blade_len * 1.2, -(half_w + 200)),
Point(blade_len + 90, max_drag - 100),
Point(blade_len, max_drag))
# "blur" curve outer
parabolic_ish(
Point(blade_len, max_drag),
Point(avg(blade_len, blur_curve_mid_x), 20),
Point(blur_curve_mid_x, max_drag*.7)
)
# "blur" curve inner
parabolic_ish(
Point(blur_curve_mid_x, max_drag*.7),
Point(avg(blur_curve_mid_x, inner_curve_w), 20),
Point(inner_curve_w, max_drag*.4)
)
# inner most curve on bottom of blade
parabolic_ish(
Point(inner_curve_w, max_drag*.4),
Point(avg(inner_curve_w, blade_x_start), 20),
Point(blade_x_start, half_w)
)
arc(Point(0,0), total_r, sin(half_w/total_r), sin(half_w/total_r))
fillpath()
rotate(2π/3)
closepath()
end
rotate((π/3))
strokepath()
sethue("white")
move(Point(0,0))
sector(inner_r, total_r, 0, 2*π, :fill)
# circle(Point(0,0), inner_r, :fill)
end 1000 1000
I originally had the center as a circle, but I felt it made it look a little too much like the hazardous waste symbol, so I switched it for the donut like sector shape. I also am not sure if the default green, red, purple in Luxor match Julia's colors... and I'm color-blind, so I'll leave tuning that to others 😅
Edit: I think using sector(inner_r, inner_r + space/2, 0, 2*π, :fill) actually makes a more elegant center shape.
Thanks, that looks like a nice base! Would be perfect if this can somehow incorporate the "checking" part of the package as well, but please don't feel like you need do that!
I like the logos by mrufsvold and @rafael.guerra.
I remembered that you can use animated GIFs in Documenter.jl docs so I made this: 😀
If we can do a gif, it might be cool to have the blades twirl around and collect into a checkmark. That's waaay beyond my skill level, but if someone can do it, they'd have my vote!
I don't think that would be a good idea - it would probably draw too much attention to itself...