------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Area of a Shape
The area of a polygonal shape is readily calculated from its list of coordinates. For example, using the list of
coordinates shown in Table 5.1: the area is computed by

You will observe that the calculation sums the results of multiplying an x by the next y, minus the next x by the previous y. When the last vertex is selected, it is paired with the first vertex to complete the process. The result is then halved to reveal the area. As a simple test, let’s apply this formula to the shape described in Fig. 5.3:
which, by inspection, is the true area. The beauty of this technique is that it works with any number of vertices and any arbitrary shape. Another feature of the technique is that if the set of coordinates is clockwise, the area is negative, which means that the calculation computes vertex orientation as well as area. To illustrate this feature, the original vertices are reversed to a clockwise sequence as follows: The minus sign confirms that the vertices are in a clockwise sequence.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Theorem of Pythagoras in 2D
The theorem of Pythagoras is used to calculate the distance between two points.
3D Cartesian Coordinates
Two coordinates are required to locate a point on the 2D Cartesian plane, and three coordinates are required
for 3D space. The corresponding axial system requires three mutually perpendicular axes; however, there
are two ways to add the extra z-axis.
Figure 5.5 shows the two orientations, which are described as left- and right-handed axial systems. The
left-handed system permits us to align our left hand with the axes such that the thumb aligns with the x axis,
the first finger aligns with the y-axis, and the middle finger aligns with the z-axis. The right-handed
system permits the same system of alignment, but using our right hand. The choice between these axial
systems is arbitrary, but one should be aware of the system employed by commercial computer graphics
packages. The main problem arises when projecting 3D points onto a 2D plane, which has an oriented axial
system. A right-handed system is employed throughout this book, as shown in Fig. 5.6, which also shows a
point P with its coordinates. It also worth noting that handedness has no meaning in spaces with 4
dimensions or more.
Theorem of Pythagoras in 3D
The theorem of Pythagoras in 3D is a natural extension of the 2D rule. In fact, it even works in higher
diemention.
Polar Coordinates
Polar coordinates are used for handling data containing angles, rather than linear offsets. Figure 5.7 shows
the convention used for 2D polar coordinates, where the
Euler's Formula
Area of a Shape
The area of a polygonal shape is readily calculated from its list of coordinates. For example, using the list of
coordinates shown in Table 5.1: the area is computed by
You will observe that the calculation sums the results of multiplying an x by the next y, minus the next x by the previous y. When the last vertex is selected, it is paired with the first vertex to complete the process. The result is then halved to reveal the area. As a simple test, let’s apply this formula to the shape described in Fig. 5.3:
Theorem of Pythagoras in 2D
The theorem of Pythagoras is used to calculate the distance between two points.
Two coordinates are required to locate a point on the 2D Cartesian plane, and three coordinates are required
for 3D space. The corresponding axial system requires three mutually perpendicular axes; however, there
are two ways to add the extra z-axis.
Figure 5.5 shows the two orientations, which are described as left- and right-handed axial systems. The
left-handed system permits us to align our left hand with the axes such that the thumb aligns with the x axis,
the first finger aligns with the y-axis, and the middle finger aligns with the z-axis. The right-handed
system permits the same system of alignment, but using our right hand. The choice between these axial
systems is arbitrary, but one should be aware of the system employed by commercial computer graphics
packages. The main problem arises when projecting 3D points onto a 2D plane, which has an oriented axial
system. A right-handed system is employed throughout this book, as shown in Fig. 5.6, which also shows a
point P with its coordinates. It also worth noting that handedness has no meaning in spaces with 4
dimensions or more.
Theorem of Pythagoras in 3D
The theorem of Pythagoras in 3D is a natural extension of the 2D rule. In fact, it even works in higher
diemention.
Polar Coordinates
Polar coordinates are used for handling data containing angles, rather than linear offsets. Figure 5.7 shows
the convention used for 2D polar coordinates, where the
No comments
Post a Comment