A Bézier triangle is a special type of Bézier surface that is created by (linear, quadratic, cubic or higher degree) interpolation of control points.
nth-order Bézier triangle
editA general nth-order Bézier triangle has (n +1)(n + 2)/2 control points αiβjγk where i, j, k are non-negative integers such that i + j + k = n.[1] The surface is then defined as
for all non-negative real numbers s + t + u = 1.
With linear order ( ), the resulting Bézier triangle is actually a regular flat triangle, with the triangle vertices equaling the three control points. A quadratic ( ) Bézier triangle features 6 control points which are all located on the edges. The cubic ( ) Bézier triangle is defined by 10 control points and is the lowest order Bézier triangle that has an internal control point, not located on the edges. In all cases, the edges of the triangle will be Bézier curves of the same degree.
Cubic Bézier triangle
editA 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 and s, t, u (with 0 ≤ s, t, u ≤ 1 and s + t + u = 1) are the barycentric coordinates inside the triangle.[2][1]
Alternatively, a cubic Bézier triangle can be expressed as a more generalized formulation as
in accordance with the formulation of the § nth-order Bézier triangle.
The corners of the triangle are the points α3, β3 and γ3. The edges of the triangle are themselves Bézier curves, with the same control points as the Bézier triangle.
By removing the γu term, a regular Bézier curve results. Also, while not very useful for display on a physical computer screen, by adding extra terms, a Bézier tetrahedron or Bézier polytope results.
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.
Halving a cubic Bézier triangle
editAn advantage of Bézier triangles in computer graphics is that dividing the Bézier triangle into two separate Bézier triangles requires only addition and division by two, rather than floating point arithmetic. This means that while Bézier triangles are smooth, they can easily be approximated using regular triangles by recursively dividing the triangle in two until the resulting triangles are considered sufficiently small.
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,
- 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
edit- Bézier curve
- Bézier surface (biquadratic patches are Bézier rectangles)
- Surface
References
edit- ^ a b Farin, Gerald (2002), Curves and surfaces for computer-aided geometric design (5 ed.), Academic Press Science & Technology Books, ISBN 978-1-55860-737-8
- ^ 3D Surface Rendering in Postscript
Further reading
edit- Roth, S. H. Martin; Diezi, Patrick; Gross, Markus H. (September 2001), "Ray Tracing Triangular Bezier Patches", Computer Graphics Forum, 20 (3): 422–432, doi:10.1111/1467-8659.00535
- Roth, S.H.M.; Diezi, P.; Gross, M.H. (2000), "Triangular Bezier clipping", Proceedings of the Eighth Pacific Conference on Computer Graphics and Applications (PCCGA-00), IEEE Computer Society, doi:10.1109/pccga.2000.883971, hdl:20.500.11850/68729
- Yang, Xunnian; Zheng, Jianmin (April 2012), "Shape aware normal interpolation for curved surface shading from polyhedral approximation", The Visual Computer, 29 (3): 189–201, doi:10.1007/s00371-012-0715-y
- Schwarz, Michael; Stamminger, Marc (2006), "Pixel-shader-based curved triangles", SIGGRAPH '06: ACM SIGGRAPH 2006 Research posters (PDF), ACM Press, doi:10.1145/1179622.1179680, archived from the original (PDF) on 2011-01-03
- Barrera, Tony; Hast, Anders; Bengtsson, Ewert, "Surface Construction with Near Least Square Acceleration based on Vertex Normals on Triangular Meshes" (PDF), in Ollila, Mark (ed.), SIGRAD 2002, pp. 43–48
External links
edit- Quadratic Bézier Triangles As Drawing Primitives Contains more info on planar and quadratic Bézier triangles.
- Curved PN triangles (a special kind of cubic Bézier triangles)