Overview | 253
Computational
Geometry
These concepts naturally extend into multiple dimensions, as shown in
Figure 9-2:
IMultiPoint
Represents ann-dimensional Cartesian point with a fixed number of dimen-
sions, with each coordinate value using double floating-point accuracy; can
determine distance to anotherIMultiPointwith same dimensionality. Can
return array of coordinate values to optimize performance by some
algorithms.
IHypercube
Represents ann-dimensional solid shape with [left,right] bounding values for
a fixed number of dimensions; can determine whether it intersects an
IMultiPoint or contains anIHypercube with the same dimensionality.
IMultiLineSegment
Represents a finite segment inn-dimensional Cartesian space.
The allowed point values are traditionally real numbers, which forces an implemen-
tation to use floating-point primitive types to store data. In the 1970s, computations
over floating-point values were relatively costly compared to integer arithmetic.
Figure 9-1. Core interfaces for computational geometry
Figure 9-2. Interfaces to represent multiple dimensional data
Algorithms in a Nutshell
Algorithms in a Nutshell By Gary Pollice, George T. Heineman, Stanley Selkow ISBN:
9780596516246 Publisher: O'Reilly Media, Inc.
Prepared for Ming Yi, Safari ID: [email protected]
Licensed by Ming Yi
Print Publication Date: 2008/10/21 User number: 594243
© 2009 Safari Books Online, LLC. This PDF is made available for personal use only during the relevant subscription term, subject to the Safari Terms of Service. Any other use