How can I bend a straight line?

2.8k Views Asked by At

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.

2

There are 2 best solutions below

1
On BEST ANSWER

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.

0
On

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.