Bézier triangle
A
cubic Bézier triangle is a surface with the equation
-
where α
3, β
3, γ
3, α
2β, αβ
2, β
2γ, βγ
2, αγ
2, α
2γ and αβγ are the control points of the triangle.
An example Bézier triangle with control points marked
The corners of the triangle are the points α
3, β
3 and γ
3. The edges of the triange are themselves Bézier curves, with the same control points as the bézier triangle.
It is also possible to create quadratic or other degrees of Bézier triangles, by changing the exponent in the original equation, in which case there will be more or less control points. With the exponent 1, the resulting bézier triangle is actually a regular flat triangle. In all cases, the edges of the triangle will be bézier curves of the same degree.
Due to the nature of the equation, the entire triangle will be contained within the volume surrounded by the control points, and affine transformations of the control points will correctly transform the whole triangle in the same way.
An advantage of Bézier triangles in computer graphics is, they are smooth, and can easily be approximated by regular triangles, by recursively dividing the bézier triangle into two separate Bézier triangles, until they are considered sufficiently small, using only addition and division by two, not requiring any floating point arithmetic whatsoever.
- The following computes the new control points for the half of the full Bézier triangle with the corner α3, a corner halfway along the Bézier curve between α3 and β3, and the third corner γ3.
equivalently, using addition and division by two only,
| |
| |
β3:=(αβ2+β3)/2 |
| |
αβ2:=(α2β+αβ2)/2 | |
β3:=(αβ2+β3)/2 |
α2β:=(α3+α2β)/2 | |
αβ2:=(α2β+αβ2)/2 | |
β3:=(αβ2+β3)/2 |
|
| |
β2γ:=(αβγ+β2γ)/2 |
αβγ:=(α2γ+αβγ)/2 | |
β2γ:=(αβγ+β2γ)/2 |
|
|
- where := means to replace the vector on the left with the vector on the right.
- Note that halving a bézier triangle is similar to halving bézier curves of all orders up to the order of the Bézier triangle.
See also: