
Boost : 
From: Andreas Harnack (ah.boost.04_at_[hidden])
Date: 20070315 07:25:28
Hervé Brönnimann schrieb:
> Ben: I would add to your reading list the article
>
> A Coordinate Free Geometry ADT (1997) by Stephen Mann, Nathan Litke,
> Tony DeRose
> http://citeseer.ist.psu.edu/191514.html
Yes, that's exactly what we've been discussing. I still think,
however, that the topic is out of the scope of the library. (The
discussion is still quite informative though.)
The library provides a tool suitable to represent objects of
Euclidean geometry. Objects of Euclidean geometry are points in
space. Choosing an orthonormal basis (i.e. an origin and a set
of orthogonal base vectors), points can be represented by their
Cartesian coordinates, i.e. as tuples of numbers. Defining
vector operations makes Cartesian coordinates a vector space.
Further, defining a norm introduces the idea of a length and
makes it also a normed vector space, which is, due to the
similarities to Euclidean geometry, often called an Euclidean
vector space.
Objects of an Euclidean geometry and members of a vector space
are still very different. The former are real world objects, the
later abstract representations. The former exit per se, the
later are defined only by choosing a basis.
The objective of the library is to provide a type save
implementation of the vector space of Cartesian coordinates. As
such, it implements an abstract concept. The instantiation of
that concept to a particular representation, i.e. choosing a
basis, is application specific.
The user is free to define several representations, but it will
be the users responsibility to distinguish between them. It
might be reasonable to support this by type checking very
similar to dimensional analysis, but this doesn't need to be the
case.
In my recent application (and probably many similar graphical
applications) this is done by a hierarchy of widgets. Each
widget defines its own vector space as a reference to the
drawing operations it offers. The main functionality of a parent
widget is to arrange its child widgets and transform their
coordinates into this representation. Since widgets are
typically created at run time, this can't be subject of static
type checking. Other applications will have different
requirements, so the ADT presented in the paper or a similar
implementation in templates might be the appropriate solution.
In any case, however, it will be independent of the vector
implementation and should consequently not be part of the vector
library.
Andreas
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk