1
$\begingroup$

Let say I've a simple straight line function $y=1.6x$

Observe the Graph

and I want to bend it up (or down, later), such as this:

Observe the Graph

which part of my function do I need to change to get this? And once I've got it, what's the parameter to change the slope? Getting somethings more or less strong:

Observe the Graph

I hope the question is clear and feasible.

$\endgroup$
0
1
$\begingroup$

I would have a look at Bézier curves.

Here you can specify points the curve has to go through and some control points which influence the shape of the curve.

In general the problem of finding a curve that includes a set of given points (and possibly fulfills extra conditions like slopes or higher derivatives) is called interpolation.

$\endgroup$
1
  • $\begingroup$ Nice. With some math and programming, I got Cubic Bézier curves and makes my own bend! Thanks a lot! $\endgroup$
    – markzzz
    Feb 3 '16 at 15:56
1
$\begingroup$

Assuming that you're referring to a line sment, there are a lot of ways to do this. For the sake of further simplicity, just assume that we consider the function $f:[0,3] \to \mathbb{R}$ defined by $f(x)=0$.

Well intuitively you could refer to a parabola [or actually any polynomial] that just goes through $(0,0)$ and $(3,0$. For example, the parabola:

$(x-3)(x)=y$ and then more generally: $A(x-3)(x)=y$ for $A \in \mathbb{R}-\{0\}$.

This of course is a kind of limited "bending," as it is symmetric. But you could similarly think about trigonometric functions of more general polynomials: $\sum_{n=1}^{\infty}a_{n}\cdot x^{n}$.

The most general method would have to be path homotopy between points, which requires a bit of work, but I will leave a link: homotopy

If you're not looking for a line segment, one could intuitively construct a decaying exponential function that is asymptotic to the axes, so that it appears like it is "bending."

Let me know if this is the kind of thing you had in mind.

$\endgroup$
0
$\begingroup$

I am not a mathematician, but a programmer, so please bear with my lack of scientificity. From time to time I need to "bend" an f(x) = x function.

These are the basic functions I use, maybe it helps someone else:

Lets say we have a straight line of the function f(x) = x

x can be any value between zero and xmax.

enter image description here

You can use this online tool optimize the functions to your needs: https://www.desmos.com/calculator

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.