I suggest you implement Triangular Bezier Clipping (PDF).
However, another option would be to convert your triangular patch into a patch of a gapless Bezier product. The advantage of this is that there is much more support for the tensor Beziers product, so you are more likely to find a code that you can use. The conversion is simple:
- Look at your triangular patch as a series of n + 1 lines of breakpoints (where n is the degree)
- The first line has 1 control point, and each line has one more control point than the last
- Now consider each row as a Bezier curve of the corresponding degree (degree 0 to degree n)
- Degree raises each row to degree n
- , n n ,
, , . , - ( ), , . , . Bezier Clipping, .