Clever Geek Handbook
📜 ⬆️ ⬇️

Bezier Triangle

A Bezier triangle is a special type of Bezier surface obtained by interpolating (linear, quadratic, cubic, or higher) by control points.

Content

Nth Bezier Triangle

The n- th generalized Bezier triangle has ( n + 1) ( n + 2) / 2 control points a i β j γ k , where i , j , k are non-negative integers such that i + j + k = n [ 1] . Then the surface is defined as

(αs+βt+γu)n=∑i+j+k=ni,j,k≥0(nijk)sitjukαiβjγk=∑i+j+k=ni,j,k≥0n!i!j!k!sitjukαiβjγk{\ displaystyle (\ alpha s + \ beta t + \ gamma u) ^ {n} = \ sum _ {\ begin {smallmatrix} i + j + k = n \\ i, j, k \ geq 0 \ end {smallmatrix} } {n \ choose i \ j \ k} s ^ {i} t ^ {j} u ^ {k} \ alpha ^ {i} \ beta ^ {j} \ gamma ^ {k} = \ sum _ {\ begin {smallmatrix} i + j + k = n \\ i, j, k \ geq 0 \ end {smallmatrix}} {\ frac {n!} {i! j! k!}} s ^ {i} t ^ {j} u ^ {k} \ alpha ^ {i} \ beta ^ {j} \ gamma ^ {k}}  

for all non-negative real numbers s + t + u = 1.

In the linear case (n=one {\ textstyle n = 1}   ) The Bezier triangle is a flat triangle whose vertices are three control points. Quadratic (n=2 {\ textstyle n = 2}   ) The Bezier triangle has 6 control points that are located on its sides. Cubic Bezier Triangle (n=3 {\ textstyle n = 3}   ) is defined by 10 control points and is a Bezier triangle of the smallest order for which there is an internal control point that is not located on the side. In all cases, the sides of the triangle will be Bezier curves of the same degree.

Bezier Cubic Triangle

 
Example of a Bezier Triangle with Marked Control Points

The cubic Bezier triangle is the surface given by the equation

p(s,t,u)=(αs+βt+γu)3=β3t3+3αβ2st2+3β2γt2u+3α2βs2t+6αβγstu+3βγ2tu2+α3s3+3α2γs2u+3αγ2su2+γ3u3,{\ displaystyle {\ begin {aligned} p (s, t, u) = (\ alpha s + \ beta t + \ gamma u) ^ {3} = & \ beta ^ {3} \ t ^ {3} +3 \ \ alpha \ beta ^ {2} \ st ^ {2} +3 \ \ beta ^ {2} \ gamma \ t ^ {2} u + \\ & 3 \ \ alpha ^ {2} \ beta \ s ^ {2} t + 6 \\ alpha \ beta \ gamma \ stu + 3 \ \ beta \ gamma ^ {2} \ tu ^ {2} + \\ & \ alpha ^ {3} \ s ^ {3} +3 \ \ alpha ^ {2} \ gamma \ s ^ {2} u + 3 \ \ alpha \ gamma ^ {2} \ su ^ {2} + \ gamma ^ {3} \ u ^ {3} \ end {aligned}}, }  

where α 3 , β 3 , γ 3 , α 2 β, αβ 2 , β 2 γ, βγ 2 , αγ 2 , α 2 γ and αβγ are the control points of the triangle, and s, t, u (for 0 ≤ s, t , u ≤ 1 and s + t + u = 1) are barycentric coordinates inside the triangle. [2] [1]

Also, the Bezier triangle can be represented in a more general form as

p(s,t,u)=∑i+j+k=3i,j,k≥0(3ijk)sitjukαiβjγk=∑i+j+k=3i,j,k≥06i!j!k!sitjukαiβjγk{\ displaystyle {\ begin {aligned} p (s, t, u) & = \ sum _ {\ begin {smallmatrix} i + j + k = 3 \\ i, j, k \ geq 0 \ end {smallmatrix} } {3 \ choose i \ j \ k} s ^ {i} t ^ {j} u ^ {k} \ alpha ^ {i} \ beta ^ {j} \ gamma ^ {k} = \ sum _ {\ begin {smallmatrix} i + j + k = 3 \\ i, j, k \ geq 0 \ end {smallmatrix}} {\ frac {6} {i! j! k!}} s ^ {i} t ^ { j} u ^ {k} \ alpha ^ {i} \ beta ^ {j} \ gamma ^ {k} \ end {aligned}}}  

according to the formula for the n-th order Bezier triangle.

The angles of the triangle are points α 3 , β 3 and γ 3 . The sides of the triangle are Bézier curves with the same control points as the Bézier triangle.

If the term with γu is excluded, the correct Bezier curve is obtained. By adding additional terms, you can get a Bezier tetrahedron or a Bezier polytope .

Due to the properties of the equation, the triangle is entirely contained within the volume bounded by control points, and affine transformations of control points transform the whole triangle in a similar way.

Division of a Bezier Cubic Triangle

The advantage of using Bezier triangles in computer graphics is the fact that to divide a Bezier triangle into two Bezier triangles, only addition and division by 2, and not arithmetic of floating point numbers, are necessary. This means that smooth Bezier triangles can be recursively approximated by a collection of regular triangles by dividing the triangles by two until the triangles formed are sufficiently small.

Below is a method for calculating new control points for half the initial Bezier triangle with angle α 3 , the second angle at half the Bezier curve between α 3 and β 3 and the third angle γ 3 .

(α3′α2β′αβ2′β3′α2γ′αβγ′β2γ′αγ2′βγ2′γ3′)=(one000000000one2one200000000onefour2fouronefour0000000oneeight3eight3eightoneeight0000000000one000000000one2one200000000onefour2fouronefour0000000000one000000000one2one20000000000one)⋅(α3α2βαβ2β3α2γαβγβ2γαγ2βγ2γ3){\ displaystyle {\ begin {pmatrix} {\ boldsymbol {\ alpha ^ {3}}} {'} \\ {\ boldsymbol {\ alpha ^ {2} \ beta}} {'} \\ {\ boldsymbol {\ alpha \ beta ^ {2}}} {'} \\ {\ boldsymbol {\ beta ^ {3}}} {'} \\ {\ boldsymbol {\ alpha ^ {2} \ gamma}} {'} \\ {\ boldsymbol {\ alpha \ beta \ gamma}} {'} \\ {\ boldsymbol {\ beta ^ {2} \ gamma}} {'} \\ {\ boldsymbol {\ alpha \ gamma ^ {2}}} {'} \\ {\ boldsymbol {\ beta \ gamma ^ {2}}} {'} \\ {\ boldsymbol {\ gamma ^ {3}}} {'} \ end {pmatrix}} = {\ begin { pmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ {1 \ over 2} & {1 \ over 2} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ {1 \ over 4} & {2 \ over 4} & {1 \ over 4} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ {1 \ over 8 & {3 \ over 8} & {3 \ over 8} & {1 \ over 8} & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & {1 \ over 2} & {1 \ over 2} & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & {0 } & {2 \ over 4} & {1 \ over 4} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & {1 \ over 2} & {1 \ over 2} & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \ end {p {pmatrix} {\ boldsymbol {\ alpha ^ {3}}} \\ {\ boldsymbol {\ alpha ^ {2} \ beta}} \\ {\ boldsymbol {\ alpha \ beta ^ {2}}} \\ { \ boldsymbol {\ beta ^ {3}}} \\ {\ boldsymbol {\ alpha ^ {2} \ gamma}} \\ {\ bolds ymbol {\ alpha \ beta \ gamma}} \\ {\ boldsymbol {\ beta ^ {2} \ gamma}} \\ {\ boldsymbol {\ alpha \ gamma ^ {2}}} \\ {\ boldsymbol {\ beta \ gamma ^ {2}}} \\ {\ boldsymbol {\ gamma ^ {3}}} \ end {pmatrix}}}  
Similarly, using only addition and division by two,
β 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
βγ 2 : = ( αγ 2 + βγ 2 ) / 2
where: = means replacing the vector on the left with the vector on the right.
Note that halving a Bezier triangle is similar to halving a Bezier curve of any order to the order of a Bezier triangle.

Notes

  1. ↑ 1 2 Farin, Gerald (2002), Curves and surfaces for computer-aided geometric design (5 ed.), Academic Press Science & Technology Books, ISBN 978-1-55860-737-8  
  2. ↑ 3D Surface Rendering in Postscript , < http://www.math.ubc.ca/~cass/courses/m308-03b/projects-03b/drader/main.htm >  

Links

  • Quadratic Bézier Triangles As Drawing Primitives Contains more info on planar and quadratic Bézier triangles.
  • Paper about the use of cubic Bézier patches in raytracing (German)
  • Curved PN triangles (a special kind of cubic Bézier triangles)
  • Pixel-Shader-Based Curved Triangles
Source - https://ru.wikipedia.org/w/index.php?title=Besier Triangle&oldid = 100534364


More articles:

  • X Perseus
  • Zhambalova, Ergena Zugdarovna
  • Redistribution (village, Vladimir region)
  • Servon-sur-Vilen
  • Star (Women's Football Club, St. Petersburg)
  • Japanese peacekeeping contingent in Cambodia
  • Solodilina, Lyudmila Yakovlevna
  • Kirnats, Georgy Valerievich
  • CONCACAF League 2017
  • Zinkovka

All articles

Clever Geek | 2019