I have this graph: graph without tension
I'm using linearGradient to color the areas between the lines. I'm calculating the cutting point's x, and then calculating the offset for where I want to stop the previous color and start the new one (it will be that x)
When setting tension to be 0, (which means straight lines) the graph gets colored as expected. Problem is, that when I set tension to be 0.5 I get the following result: graph with tension The reason for that is that the tension is calculated by Bezier Curve, which changes the equation I use to calculate the cutting point (the original points have changed).
The question is, how do I calculate the points coordinates after the tension?