- #1
MisterH
- 12
- 0
On a stationary, non-periodic signal (black) a smooth causal filter is calculated (green/red). It is sampled discretely (every distance unit of 1 on the X-axis). My goal is to find which "path" it is "travelling" on so I can extrapolate the current shape until it is completed (reaches a maximum/minimum: 1st derivative = 0), in real time: so at every point in time I assume the shape of the completed "path" and I want to measure the length between the previous turning point and the extrapolated turning point of this extrapolated curve:
I was playing around with a Geogebra script of a Bézier curve because dragging around the control points is visual and intuitive (for non-math guys like me) and it is easy to see where my current smooth movement would end if it were to continue "on the same path" it is currently on. I added some restrictions to my control polygon of my Bézier curve: 2 consecutive control points can only be on horizontal or vertical lines. In case of the image above, I used a Bézier curve of order 5, so it has 6 control points with the following restrictions:
But then I realized that I don't need a parametric curve: I don't need an element of "speed" along the path (and all the headache that comes with that). I need something more simple. Should I just fit a polynomial
ax^5+bx^4+cx^3+dx^2+ex+f = 0
and then calculate where the slope of the tangent becomes 0 for points to the right of my blue arrow (to mimic that last control point F)? Or should I use a Bernstein polynomial to keep the same shape-properties as the Bézier, knowing that I only need y=f(x).
I was playing around with a Geogebra script of a Bézier curve because dragging around the control points is visual and intuitive (for non-math guys like me) and it is easy to see where my current smooth movement would end if it were to continue "on the same path" it is currently on. I added some restrictions to my control polygon of my Bézier curve: 2 consecutive control points can only be on horizontal or vertical lines. In case of the image above, I used a Bézier curve of order 5, so it has 6 control points with the following restrictions:
- A & B are on a horizontal line
- B & C are on a vertical line
- C & D are on a horizontal line
- D & E are on a vertical line
- E & F are on a horizontal line
But then I realized that I don't need a parametric curve: I don't need an element of "speed" along the path (and all the headache that comes with that). I need something more simple. Should I just fit a polynomial
ax^5+bx^4+cx^3+dx^2+ex+f = 0
and then calculate where the slope of the tangent becomes 0 for points to the right of my blue arrow (to mimic that last control point F)? Or should I use a Bernstein polynomial to keep the same shape-properties as the Bézier, knowing that I only need y=f(x).