2

I'm designing a graphical user interface, where a non-linear scaling factor can be edited.

Basically, there is a square, with a line going from the bottom left to the top right, and the user has to be able to "bend" the line into a curve.

This problem boils down to fitting a curve to 3 points (one fixed to the bottom left, one fixed to the top right, and the third can be moved around by the user) , but that's not enough. Otherwise I could just fit a second order polynomial and be ready. However, the curve has to be strictly monotonic, and, of course, also bijective. This would rule out parabolas or ellipses.

It is allowed to disable the extreme top left and bottom right regions for the moveable point.

This answer has an interesting solution, but it starts at a fixed angle, which I would see as too limiting.

vsz
  • 257

1 Answers1

2

Let $\alpha,\beta\in(0,1)$. You want to define a function $f\colon[0,1]\longrightarrow[0,1]$ such that $f(0)=0$, $f(1)=1$, and $f(\alpha)=\beta$. Just take$$f(x)=x^\frac{\log\beta}{\log\alpha}=\beta^{\frac{\log x}{\log\alpha}}.$$