Comments (6)
I tried the following formula.
(log10(x*12/5+1)*72 + min(x,50)*3) / 2 + 3
It is uncomfortable to have a small number of contributes.
I thought of using the following formula.
log10(x/20+1)*144+3
It is a little smaller, but I think it is acceptable.
from github-profile-3d-contrib.
Hi formidablae. Thank you for your proposal.
I think the idea of using logarithms is good.
The formula for finding the height is as follows.
- Previous height:
h1(x) = min(50, x)*3 + 3
- New height:
h2(x) = log(x*N+1)*K + 3
To determine N
and K
, I set some constraints.
First, if there are fewer contributions, I want to make the difference smaller than before.
h2(0) = h1(0) = 3
andh2(1) = h1(1) = 6
h2(1) - h2(0) = 3
log(N+1)*K - log(1)*K = 3
K = 3 / log(N+1)
h2(x) = log(x*N+1) / log(N+1) * 3 + 3
Next, I want to display the number of possible contributions at about the previous maximum size.
I think it's about 1200 contributions a day.
h2(1200) = h1(50) = 153
log(1200*N+1) / log(N+1) = 50
N = 0.1008515...
Rounding off the fine numbers, we get the following.
h2(x) = log(x/10+1)*72 + 3
However, 1200 contributions per day may be too much.
from github-profile-3d-contrib.
You are welcome @yoshi389111 :)
Your adjusted solution is better. I didn't know about the max 1200 contributions per day.
Nicely done that reverse parameter calculation!
However, 1200 contributions per day may be too much.
Yeah, you are right. But, since the heights of all days will be recalculated, there shouldn't be unusual differences between them (even with way less contributions than 1200).
Did you do produce any 3d svg with the new formula? Are the heights too low or too high when compared to the heights obtained with the old formula?
from github-profile-3d-contrib.
I didn't know about the max 1200 contributions per day.
I may have misled you.
1200 is not the maximum number of contributions per day on github.
It is the maximum number of contributions that can be displayed in this tool without overlapping or overflowing.
Are the heights too low or too high when compared to the heights obtained with the old formula?
With this formula, the display seems to be too small.
I would like to adjust the formula so that it can be displayed a little larger.
from github-profile-3d-contrib.
1200 ... is the maximum number of contributions that can be displayed in this tool without overlapping or overflowing.
Oh ok, now I get it.
With this formula, the display seems to be too small.
I would like to adjust the formula so that it can be displayed a little larger.
Did you try doing an average of the old linear formula and the new logarithmic one?
from github-profile-3d-contrib.
Wow, the second one looks wonderful! Even though the absolute height of 51 contributions/day would now be lower than before, the differences between the heights of different days would still be very distinguishable, colors help too - so that last formula works perfect (for me at least :) ).
from github-profile-3d-contrib.
Related Issues (20)
- How do the contribution circle calculated? HOT 3
- TypeError: Cannot read property 'repositories' of null
- [Feature] Add Environment Variable to exclude some repos' commits. HOT 3
- [Feature] Add border/stroke HOT 4
- 3D contrib seems not to be working with snake contributions HOT 1
- Upgrade to Node 16
- How to added custom height and width to the card HOT 1
- Unsuccessful run HOT 2
- 401 HOT 2
- Save the generated images to different directory HOT 2
- Node.js 12 actions are deprecated. How to upgrade? HOT 1
- Cannot read properties of null (reading 'repositories') HOT 3
- How to change rainbow to 'day mode'? HOT 3
- [Feature][Question] Display another profile contribution as well HOT 4
- [Bug] Wrong language detection HOT 5
- [Bug] Variable name cannot start with "GITHUB_" prefix. HOT 1
- [Feature][Question] add stats integration for private projects with wakatime HOT 1
- nothing to commit, working tree clean
- [Feature] Add ability to filter out languages
- Count private repo changes HOT 4
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 github-profile-3d-contrib.