Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PropCheck Logo #11

Open
mrufsvold opened this issue Jul 13, 2023 · 5 comments
Open

PropCheck Logo #11

mrufsvold opened this issue Jul 13, 2023 · 5 comments

Comments

@mrufsvold
Copy link

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

image

@mrufsvold
Copy link
Author

mrufsvold commented Jul 13, 2023

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.

@Seelengrab
Copy link
Owner

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!

@cormullion
Copy link

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: 😀

fan

@mrufsvold
Copy link
Author

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!

@cormullion
Copy link

I don't think that would be a good idea - it would probably draw too much attention to itself...

fan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants