Graphics Programs Reference
In-Depth Information
Solution of Part (1) Let the triangle beformedbycollapsing corners 3 and 4ofa
quadri lat eral. T he corner coordinates of thisquadrilateral are x
2] T and
=
[
1
,
1
,
2
,
, 3
[ 3
y
0] T . To determine the minimum requiredintegration order foran
exact result, we must examine f [ x (
=
,
0
,
ξ,η
)
,
y (
ξ,η
)] |
J (
ξ,η
)
|
, the integrand in Eq. (6.45).
Since
y ) iscubic in x , the integrand is apolynomialof
degree 5in x . Therefore, third-orderintegrationwill suffice. The command used for
the computations issimilar to the one in Example 6.15:
|
J (
ξ,η
)
|
is biquadratic, and f ( x
,
_
>>I=gaussQuad2(@fex6
16,[-1;-1;2;2],...
[sqrt(3);-sqrt(3);0;0],3)
I=
-1.5588
The function that returns z
=
f ( x
,
y ) is
_
functionz=fex6
16(x,y)
% Function used in Example 6.16
z = (xˆ2 + yˆ2)/2 - (xˆ3 - 3*x*yˆ2)/6 - 2/3;
Solution of Part (2) The following command executes quadratureover the triangular
element:
>>I=triangleQuad(@fex6
_
16,[-1; -1; 2],[sqrt(3);-sqrt(3); 0])
I=
-1.5588
Since the integrand is a cubic, this result is also exact.
Note thatonly four function evaluations were requiredwhenusing the tri-
angle formulas. In contrast, the function had to beevaluatedat nine points in
Part(1).
EXAMPLE 6.17
The
,
,
,
corner coordinates
of a triangle are(0
0),
(16
10) and (12
20).Compute
A x 2
y 2 dx dy over thistriangle.
Search WWH ::




Custom Search