Non Linear Formula: Generate Formula From Logic

33 Views Asked by At

I am trying to simulate a slider on a webpage that behaves non-linearly as shown in the illustration below.

I want to generate a mathematical formula that can represent these states and also give all values in between. I thought this looked like something I can achieve with a log formula, but I could not produce a formula that works.

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

You can achieve this with an exponential function.

First define $x$ as a percentage on the slider.

$f(x)=100\times (\sqrt[50]10)^x$

If we evaluate $\sqrt[50]10$, we get:

$f(x)=100\times 1.047129^x$

When $x=50$, $f(50)=1000$. When $x=0$, $f(0)=100$.