Comments (7)
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:
- 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.
- 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?
- 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 thatSymbolicDimensions
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.
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.
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
from dynamicquantities.jl.
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.
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
from dynamicquantities.jl.
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.
I'll try doing that soon :)
from dynamicquantities.jl.
Related Issues (20)
- Further improvements to startup time HOT 1
- Behavior with `missing` HOT 6
- Adding "missing" units HOT 4
- Compatibility with `zero(::Type{T})` HOT 6
- Unitful conversion fails for symbolic units HOT 7
- Sweep: Define `NoDims` for indicating something is not a quantity HOT 2
- `reduce(vcat` returns corrupted result HOT 1
- `map` fails with `QuantityArray` HOT 3
- u"Ω" errors in precompilation HOT 6
- Base.isapprox fails for Vector{Quantity} HOT 14
- Meshes.jl test failure HOT 10
- Round tripping Quantities through String HOT 3
- `bionomial` and `factorial` functions not defined? HOT 5
- Molar units not supported HOT 7
- Why `one(1u"kg")` no dimension? HOT 2
- Pretty print element types of `QuantityArray` HOT 2
- How to cite DynamicQuantities.jl? HOT 2
- Inconsistency between one(x::Quantity) and zero(x::Quantity) HOT 1
- validate_upreferred() destroys performance. Should there be a way to opt out? HOT 15
- unexpected behavior with Set? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamicquantities.jl.