Boost logo

Boost :

Subject: [boost] Coordinates as abstractions [was: Preview 3 of the Geometry library]
From: John Phillips (phillips_at_[hidden])
Date: 2008-10-22 11:02:18


   After a little more thought, I have a different way to talk about
coordinate systems that may make more sense in a computer science setting.

   Philosophical arguments aside, let us assume that some piece of space
is the real object you are trying to use and describe in your program.
In that case, as with any real thing brought into a computer program,
you produce some abstraction and work with the abstraction as an
approximate replacement for the real thing.

   The quality of that abstraction is determined by a few factors. Does
it capture the important facets of the problem at hand? Does it provide
an interface that allows for a clear description and solution of the
problem? Can it be implemented in a way that translates from the
interface to the hardware in a reasonably efficient and accurate way?
Does it allow the user to solve the problem in terms of already familiar
  concepts? (There are some others, but this is enough of a list for the
moment.)

   Cartesian coordinates are one example of such an abstraction. They
are very useful for a number of real problems and they are the simplest
to visualize, so they are often the first version anyone learns. By
analogy, a simple array is typically the first data structure anyone
learns when programming. It is easy to visualize, and easy to implement
so it is a good first example. It is also useful for many problems so
the time spent learning it is valuable.

   In the context of this analogy, other coordinate systems (such as
spherical, or cylindrical, or confluent hypergeometric) are equivalent
to other data structures (such as lists, queues or trees). They are a
different abstraction of the same underlying real object (the piece of
space, or the collection of data). They are a good choice exact in those
cases where they make problems easier to think about and to solve. Just
as anyone who does anything with a computer must know how to use at
least one data structure, experts know the proper situations in which to
apply many different data structures, and there are specialty data
structure that are only known to the small communities that need them
regularly; the same can be said for coordinate systems.

   Everyone who has ever made a graph knows at least one (usually,
Cartesian), experts know many (most physicists are comfortable with at
least 3 and could apply dozens at need), and some specialized
communities have systems they use frequently that the rest of us have
never spent time thinking about.

   The quality of this abstraction is measured the same way as any
other, and by that measure of quality it is true that Cartesian is just
not always the best choice.

   I don't know if this helps, but I'm trying to move my reasons out of
specialized math and science considerations and into the language more
common in good design.

                        John


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk