Git Product home page Git Product logo

Comments (7)

MilesCranmer avatar MilesCranmer commented on June 12, 2024

My god that is beautiful!!! Very nice work! It very cleanly conveys the concepts I think, and is also nice to look at.

My suggestions, if you would like them(?), are:

  1. The blue overlay is a bit heavy. I wonder if it could be lighter, and in the center of the transparent part, there could be a single line (like hands of a watch), to indicate that is the current value.
  2. In general, I wonder if a circle is the right symbolism here, since the physical units don't really 'wrap around' per se? Maybe 3 sliding rulers on top of eachother (basically the circles, but unwrapped) might work?
  3. The 'dynamic' part is moreso with respect to the exponent of a physical dimension (like m^1, m^2, m^3 - the integer can change without changing the type) rather than the prefix. I wonder if that could be indicated somehow...? Although it is also true that SymbolicDimensions let you change the prefix without changing the type! So it could be good as-is in that sense.

I'm very happy to work towards using this as the logo! Thanks so much for this.

from dynamicquantities.jl.

jkrumbiegel avatar jkrumbiegel commented on June 12, 2024

Maybe 3 sliding rulers on top of eachother (basically the circles, but unwrapped) might work?

Yeah I had been thinking the same, I'll try that out when I have some time

from dynamicquantities.jl.

jkrumbiegel avatar jkrumbiegel commented on June 12, 2024

Something in that direction?

using Luxor
using Luxor.Colors


image_width = 500

@drawsvg begin
    circle_radius = 0.85 * image_width / 2
    scale(circle_radius, circle_radius)

    offsets = [-0.07, 0.07, -0.02]
    colors = Base.splat(RGB).([Luxor.julia_green, Luxor.julia_red, Luxor.julia_purple])
    strip_thickness = 0.25
    stripgap = 0.04
    sectorwidth = 0.25
    sector_whiten = 0.2

    exponents = -3:3
    exp_shifts = [0, 3, -2]
    units = ["g", "s", "m"]

    whiten(c, fraction) = Colors.weighted_color_mean(fraction, c, colorant"white")

    n = length(units)

    full_height = n * stripgap + n * strip_thickness

    sethue(Luxor.julia_blue)
    box(O, sectorwidth * 0.8, full_height + 0.15, action = :fill)

    for i in 1:3
        color = colors[i]

        y = (i-1) * stripgap + (i-1) * strip_thickness - (full_height * (n-1) / n / 2) #+ (.5 * strip_thickness)

        for (j, exponent) in enumerate(exponents)
            e = exp_shifts[i] + exponent
            x = offsets[i] + (j * sectorwidth) - ((length(exponents)+1)/2 * sectorwidth)
            
            # sethue(colors[i])
            sethue(iseven(j) ? colors[i] : whiten(colors[i], 1 - sector_whiten))

            box(Point(x, y), sectorwidth, strip_thickness, action = :fill)
            
            sethue("white")
            s = "$(units[i])<sup>$e</sup>"

            @layer begin
                setfont("Helvetica Bold", 20)
                settext(s, Point(x, y); valign = "center", halign = "center", markup = true)
            end
        end
    end

    sethue(Luxor.julia_blue)
    setline(20)
    box(O, sectorwidth + 0.1, full_height + 0.15, action = :stroke)

end image_width image_width
image

from dynamicquantities.jl.

MilesCranmer avatar MilesCranmer commented on June 12, 2024

Brilliant! What do you think?

I almost feel like the ms and km are more suggestive of physical units than s and m. I wonder if there's a sensible way to mix them.

With SymbolicDimensions you can basically have a sliding scale across whatever symbols you like. So it is valid to have powers of ms or km or whatever other symbol/unit desired. Even physical constants like ℏ can have arbitrary powers. So perhaps that could be interesting to display instead, as it is more indicative of physics maybe... Wdyt?

from dynamicquantities.jl.

jkrumbiegel avatar jkrumbiegel commented on June 12, 2024

The exact semantics of the package might be difficult to put into logo form exactly :) But at least I think the units with prefixes are more easily understood as units than the version with different powers. ks is probably not great and could be h instead

using Luxor
using Luxor.Colors


image_width = 500

@drawsvg begin
    circle_radius = 0.85 * image_width / 2
    scale(circle_radius, circle_radius)

    offsets = [-0.13, 0.06, -0.07]
    colors = Base.splat(RGB).([Luxor.julia_green, Luxor.julia_red, Luxor.julia_purple])
    strip_thickness = 0.25
    stripgap = 0.04
    sectorwidth = 0.25
    sector_whiten = 0.2

    prefixes = ["p", "f", "μ", "m", "", "k"]
    units = ["g", "s", "m"]

    whiten(c, fraction) = Colors.weighted_color_mean(fraction, c, colorant"white")

    n = length(units)

    full_height = n * stripgap + n * strip_thickness

    sethue(Luxor.julia_blue)
    box(O, sectorwidth * 0.75, full_height + 0.15, action = :fill)

    for i in 1:3
        color = colors[i]

        y = (i-1) * stripgap + (i-1) * strip_thickness - (full_height * (n-1) / n / 2) #+ (.5 * strip_thickness)

        for (j, prefix) in enumerate(prefixes)
            x = offsets[i] + (j * sectorwidth) - ((length(prefixes)+1)/2 * sectorwidth)
            
            # sethue(colors[i])
            sethue(iseven(j) ? colors[i] : whiten(colors[i], 1 - sector_whiten))

            box(Point(x, y), sectorwidth, strip_thickness, action = :fill)
            
            sethue("white")
            s = "$(prefix)$(units[i])"

            @layer begin
                setfont("Helvetica Bold", 20)
                settext(s, Point(x, y); valign = "center", halign = "center", markup = true)
            end
        end
    end

    sethue(Luxor.julia_blue)
    setline(20)
    box(O, sectorwidth + 0.08, full_height + 0.15, action = :stroke)

end image_width image_width
image

from dynamicquantities.jl.

MilesCranmer avatar MilesCranmer commented on June 12, 2024

Hi @jkrumbiegel,
I think this looks awesome. Do you want to push it in a PR to create the logo on the README so that the commit is credited to your username?
Cheers!
Miles

from dynamicquantities.jl.

jkrumbiegel avatar jkrumbiegel commented on June 12, 2024

I'll try doing that soon :)

from dynamicquantities.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.