Next / Previous / Contents / Shipman's homepage

3. Interface to the Python homcoord module

This module provides two Python classes that represent the principal modeled objects: points and transforms. See Section 3.1, “The Pt class: A Cartesian point” and Section 3.2, “The Xform class: Coordinate transformation”.

In addition to importing the homcoord module, you will probably also want to import the numpy package. For documentation on this package, see the SciPy homepage.

Note

This version of the package is designed for 2-dimensional coordinates. To handle 3-dimensional coordinates, there are two possible approaches:

  • Provide two completely separate packages, and call the second one something like “homcoord3”.

  • Provide one package that determines the dimensionality of the coordinates everywhere they are accepted as arguments. In this approach, it will be necessary to check that users do not mix 2- and 3-dimensional coordinates and transforms.