2D Coordinate Systems in RAVL
In 2D RAVL objects, such as arrays, matrices and images, the
indices are in the order: row, column (as in conventional matrix
notation). In pairs of reals (e.g. 2D vectors and points), the
components are in the order x, y. Normally these
two categories of objects do not interact. However, when they
do (e.g. if we want to construct a pixel position, an
Index2dC from a
Point2dC), the
RAVL convention is this:
- The row index is associated with the x value
- The column index is associated with the y value
The implication is that RAVL adopts a 2D coordinate system in which the
x coordinate points downwards, and the y coordinate to the right.
Not what you were expecting? It has the advantages that:
- the coordinate system is anti-clockwise, as is conventional in mathematics
- the first array coordinate is associated with the first vector component etc.