How to calculate and curved line from given parameters.

375 Views Asked by At

Given the distance from the start to the end of an arc $d$, the maximum height of the arc $h$ and some control point to define the type of curve $c$

How might one calculate points on a curve?

E.G. $$d = 10, h = 10, c = [d/2, h]$$

$$[x, y]$$ $$[0, 0]$$ $$[1, ?]$$ $$[2, ?]$$ $$...$$ $$[9, ?]$$

EDIT perhaps a better explanation: Define a curve using Distance, Height and attack and decay. Output Y coordinate for any given X for points on the curve. I am thinking a cubic Bezier curve would meet my needs. But I am finding it hard to grasp how they work.

1

There are 1 best solutions below

0
On BEST ANSWER

Assuming that you are looking for a parabola, then the equation for the curve would be $$ y=\frac{4h}{d^2}x\left(d-x\right) $$