First Order Bezier Triangle

Description
Bezier Surfaces are often used in computational geometry to represent surfaces. It is often useful to represent a surface as a connected set of triangles. Sometimes a triangle is calculated as a rectangle with a collapsed side. This can lead to extreme oscillations in the surface near the collapsed side.[br]An alternative is Barycentric coordinates.[br][br]This system is built up where each point inside the triangle is made up of a weighted sum of the coordinates of the vertices. Since there are three vertices and a surface has only two degrees of freedom one of the weights must be related to the other two weights. In this applet 's' is 1 at the vertex P[sub]100[/sub] and zero along the opposite side. 't' is one at the P[sub]010[/sub] vertex and zero along the opposite side. 'u' would be one at the P[sub]001[/sub] vertex and zero on the opposite edge.[br][br]The interior point 'A' is the weighted sum of the vertex coordinates[br][math]A=s\cdot P_{100}+t\cdot P_{010}+u\cdot P_{001}[/math] . The extra constraints are that for 'A' to be inside the triangle [math]s+t+u=1[/math] and all three parameters are between zero and one. In this applet these result in the ranges [math]0\le s\le1[/math] and [math]0\le t\le1-s[/math] with [math]u=1-s-t[/math].[br][br]The alternative rectangle with u v parameters is that one parameter on the collapsed edge could vary without moving the resulting surface point.
Activities
The main thing with this applet is to get used to Baycentric Coordinates. Move the control nodes (knots) and the parameter 's' and 't' sliders and see how the triangle and weighted point 'A' change. This is important for going to higher order curved triangular surfaces.

Information: First Order Bezier Triangle