Given an $y$-coordinate and the three control points of a quadratic Bezier curve, can you calculate $~t~$ in the following way ?:
$ y_{p0} - y + 2(y_{p1} - y_{p0})t + (y_{p0} - 2y_{p1} + y_{p2})t^2 = 0 $
$a = (y_{p0} - 2y_{p1} + y_{p2})$
$b = 2(y_{p1} - y_{p0})$
$c = y_{p0} - y$
Use quadratic formula to find $t$
(I believe it should, but I'm trying to use this method to rasterize $2$D Bezier-triangles and I'm failing and can't find why. I'm mostly asking if it's possible in theory or not, because if there is something wrong in the implementation I should be the first person to find it as I'm most familiar with my code, while I would not be able to find my mistake if the math behind my algorithm is flawed in the first place.)
Thank you for your answer.
It is possible to find $t$ for a given $x$ or $y$ value in a quadratic bezier curve.
The quadratic bezier formula $$ y = y_1 + (1-t)^2(y_0-y_1) + t^2(y_2-y_1) $$ can be magically rearranged to $$ t = \frac{(y_{0} - y_{1}) \pm \sqrt{y y_{0} - 2 y y_{1} + y y_{2} - y_{0} y_{2} + y_{1}^{2}}}{y_{0} - 2 y_{1} + y_{2}} $$
This looks very similar to your solution when your $a, b, c$ values are substituted in the quadratic formula.
Here are the key aspects for traversal: