1
$\begingroup$

This question asks about how to intersect a ray with a bezier triangle: Intersect Ray (Line) vs Quadratic Bezier Triangle

What would happen if we had a bezier triangle that had scalars for control points, so they only controlled the height of each point on a triangle?

Would it be much easier then to find where a line intersected it?

Unfortunately I'm not sure where to even start, other than this equation, the explicit quadratic Bezier triangle! Anyone able to help me out?

$y = P_0S^2+2P_1ST+2P_2SU+P_3T^2+2P_4TU+P_5U^2$

$S,T,U$ are the barycentric coordinates of the triangle and $P_i$ are the scalar control points.

How would I go about finding where a line intersected with such an object, if it did at all?

$\endgroup$

1 Answer 1

1
$\begingroup$

This is much easier than the general case you asked about before.

You can eliminate $S$, $T$, $U$, and get the equation of the triangular patch in the implicit form $f(x,y,z) = 0$. In fact, the function $f$ will have degree 2, which means that the patch is actually just a portion of a quadric surface. Intersecting a line with a quadric surface is fairly straightforward --- you just have to solve a quadratic equation.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .