266
N. b. A. Hadi et al.
defined as to locate points relative to existing points rather than to an origin and
known as the local coordinates.
The new vertices are inside the triangle if all values of P are positive otherwise,
the new vertices are outside the triangle and do not have any intersection with any
segments. Let P be the new vertices to be considered as below;
P = (−1)
0 t 0 t 1 t 2
P x a x b x c x
P y a y b y c y
1 1 1 1
a x b x c x
a y b y c y
1 1 1
= αt 0 + βt 1 + γ t 2 where α, β, γ = 0
(23.1)
Point (t 0 , t 1 , t 2 ) is the Barycentric coordinates where it is homogeneous, hence
Eq. (23.2) is always true.
t 0 + t 1 + t 2 = 1
(23.2)
The next vertices are selected if and only it does not intersect with any segments
of the triangle. Hence, these two vertices are all set to be connected as an edge and
create the new triangle.
23.2.1.2 Choose an Angle θ
◦
≥ 60
◦
As for the next move, only one triangle will be selected since the new vertices
can create more than one triangle. The angles of all possible new triangles will be
calculated and by applying these properties, the chosen triangle is the triangle with
an angle from new vertices that has more than 60
◦ . The idea of this property is based
on the formula of small angle approximation where 1 rad ≈ 57.2958. The purpose
is to tend to avoid the skinny triangles in order to produce the quality of triangles.
Let θ
◦ be the angle between point A(x 1 , y 1 ) and B(x 2 , y 2 ) and θ
◦ can be obtained
by applying the dot product rule as below;
A ∗ B = |A| ∗ |B| ∗ cosθ
◦
(23.3)
θ
◦
= arccos(
A ∗ B
|A| ∗ |B|
)
(23.4)
where A ∗ B can be solved as equation
A ∗ B = (x 1 ∗ x 2 ) + (y 1 ∗ y 2 )
(23.5)
Précédent

- 285/349

Suivant