I'm trying to find the intersection between a line segment and a quadratic bezier triangle for my OpenCL real time raytracer.
This question Detect&find intersection ray vs. cubic bezier triangle talks about finding the collision point between a ray and a cubic bezier triangle and the main recomendations are to try subdivision, or tensor product bezier patches.
I've read in a few places that when testing a line segment against a quadratic bezier triangle, that you just end up having to solve a quadratic equation, but I haven't found any information on what that equation actually is and am starting to wonder if it's true. My attempts to find it also have come up short so far :P
Does anyone know if this is true or how to solve it besides using subdivision or tensor product bezier patches?
Here's the equation for a quadratic bezier triangle:
AS^2 + 2*DST + 2*ESU + B*T^2 + 2*FTU + C*U^2
Where S,T,U are the parameters to the triangle. You could replace U with (1-S-T) since they are barycentric coordinates.
A,B,C are the corners of the triangle, and D,E,F are the control points along the edges.
Super stumped on this one!