Graphics Reference
In-Depth Information
The normal vector
n
is given by
ijk
n
=
a
×
b
=
−
505
505
=50
j
12.5 Area of a Triangle using Vectors
The vector product is also useful in calculating the area of a triangle using
two of its sides as vectors. For example, using the same points and vectors in
the previous example
i
jk
area =
1
=
1
2
=
1
−
505
505
2
|
a
×
b
|
2
||
50
j
||
area = 25
12.6 General Form of the Line Equation from Two Points
The general form of the line equation is given by
ax
+
by
+
c
=0
and it may be required to compute this equation from two known points. For
example, Figure 12.5 shows two points
P
1
(
x
1
,y
1
)and
P
2
(
x
2
,y
2
) from which it
is possible to determine
P
(
x
,
y
).
Y
P
2
y
2
P
y
P
1
y
1
x
1
x
x
2
X
Fig. 12.5.
A line formed from two points
P
1
and
P
2
.