Graphics Reference
In-Depth Information
Ta b l e 3 . 2 Coordinates of the
vertices used in Fig. 3.4
Ve r t e x
x
y
z
P 1
0
0
1
P 2
1
0
0
P 3
0
1
0
s
=−
1 i
+
0 j
+
1 k
r
×
s
=
( 1
×
1
0
×
0 ) i
(
1
×
1
(
1 )
×
0 ) j
+
(
1
×
0
(
1 )
×
1 ) k
k .
This confirms what we expected from Fig. 3.4 . Now let's reverse the vectors to
illustrate the importance of vector sequence:
t
=
i
+
j
+
s
×
r
= ( 0
×
0
1
×
1 ) i
(
1
×
0
(
1 ) ×
1 ) j
+ (
1
×
1
(
1 ) ×
0 ) k
t
=−
i
j
k
which is in the opposite direction to r
×
s and confirms that the vector product is
non-commutative.
3.12 The Right-Hand Rule
When we cover multivectors we will see that lines, planes and volumes are all ori-
ented and can be described mathematically. In particular, 3D space is described as
being left- or right-handed, and in this topic we choose to work with a right-handed
space. Consequently, the right-hand rule is an aide mémoire for working out the
orientation of the cross product vector. Given the operation r
s , if the right-hand
thumb is aligned with r , the first finger with s , and the middle finger points in the
direction of t .
×
3.13 Deriving a Unit Normal Vector
Figure 3.5 shows a triangle with vertices defined in an anti-clockwise sequence from
its visible side. This is the side from which we want the surface normal to point.
Using the following information we will compute the surface normal using the cross
product and then convert it to a unit normal vector.
Create vector r between P 1 and P 3 , and vector s between P 2 and P 3 :
r
=−
1 i
+
1 j
+
0 k
s
=−
1 i
+
0 j
+
2 k
r
×
s
=
( 1
×
2
0
×
0 ) i
(
1
×
2
0
×−
1 ) j
+
(
1
×
0
1
×−
1 ) k
t
=
2 i
+
2 j
+
k
 
Search WWH ::




Custom Search