[gameprogrammer] Line vs Quadratic Bezier Triangle Intersection?

  • From: Alan Wolfe <alan.wolfe@xxxxxxxxx>
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Tue, 25 Mar 2014 08:55:45 -0700

Hey Guys,

I've been trying to figure this out for a while without much success, does
anyone know how to calculate this?

Bezier Triangle: http://en.wikipedia.org/wiki/B%C3%A9zier_triangle

The equation of a quadratic bezier triangle is this:
AS2 + 2DST + 2ESU + BT2 + 2FTU + CU2

Where A,B,C are the corners of the triangle. D is the control point for the
quadratic bezier curve of AB. E is the control point for AC and F is the
control point for BC.  Each side of a quadratic bezier triangle is a
quadratic bezier curve (3 control points, one for each end point and one in
the middle).

S,T,U are the parameters for the bezier triangle equation, and since they
are barycentric coordinates, U could be replaced by (1-S-T).

I'm trying to find the S,T,U where the line intersects the triangle.

Can anyone help me out? I've been trying for days/weeks with no luck, and
haven't found any info on the net or in books, other then a few places that
say it boils down to solving a quadratic equation, but nobody giving any
specifics.

Other related posts: