I have a bar that shows the time left for a task to finish and I want it to decrease faster as it gets closer to the end time.
Example: Let's assume that the total time required for Task A to expire is 24 hours. When elapsed time is 0 (time left is 24 hours), the bar is 100% full. When elapsed time is 8 hours (time left is 16 hours), the bar is about 85-90% full. When the elapsed time is 16 hours (time left is 8 hours), the bar is about 65-70% full. When the elapsed time is 20 hours (time left is 4 hours) the bar is 50% full. When the elapsed time is 24 hours (time left is 0 hours) the bar is empty.
I would really appreciate if someone could point me in the right direction on what function to use to solve something like this. Please note that the bar values are guestimations but basically, I need the 50% point to be about 1/6 of the total time and then the values need to go to 0 in the remaining time.
Thanks!
Use the Langrange interpolation (here) with (1,1) (2/3,0.875) (1/3,0.675) (1/6,0.5) (0,0)