Graphics Programs Reference
In-Depth Information
A convenientformula of computing A from the corner coordinates ( x i ,
y i ) is
111
x 1
1
2
A
=
x 2
x 3
(6.49)
y 1
y 2
y 3
The area coordinates are mappedinto the Cartesian coordinates by
3
3
x (
α
3 )
=
1 α
i x i
y (
α
3 )
=
1 α
i y i
(6.50)
1
2
1
2
i
=
i
=
The integration formula over the element is
A
k
f [ x (
α
)
,
y (
α
) ] dA
=
W k f [ x (
α k )
,
y (
α k ) ]
(6.51)
A
where
α k represents the area coordinates of the integrationpoint k , and W k are the
weights. The locationsoftheintegrationpoints are shown in Fig. 6.10, and the corre-
sponding values of
α
k and W k arelistedinTable 6.7. The quadrature in Eq. (6.51) is
exact if f ( x
,
y ) is apolynomialofthedegree indicated.
b
a
c
a
a
Figure 6.10. Integrationpoints of trian-
gular elements.
c
d
b
(a) Linear
(b) Quadratic
(c) Cubic
Degree of f ( x
,
y )
Point
α k
W k
(a) Linear
a
1
/
3
,
1
/
3
,
1
/
3
1
(b)Quadratic
a
1
/
2
,
0
,
1
/
2
1
/
3
b
1
/
2
,
1
/
2
,
0
1
/
3
c
0
,
1
/
2
,
1
/
2
1
/
3
/
,
/
,
/
/
(c) Cubic
a
1
3
1
3
1
3
27
48
b
1
/
5
,
1
/
5
,
3
/
5
25
/
48
c
3
/
5
.
1
/
5
,
1
/
5
25
/
48
d
1
/
5
,
3
/
5
,
1
/
5
25
/
48
Table 6.7
triangleQuad
The function triangleQuad computes A
,
y ) dx dy overatriangular regionus-
ing the cubicformula—case (c) in Fig. 6.10. The triangle is definedbyits corner co-
ordinate arrays x and y , where the coordinates must belistedinacounterclockwise
directionaround the triangle.
f ( x
Search WWH ::




Custom Search