Spatial geometry 1
Points and vector algebra
Last updated
Points and vector algebra
Last updated
The objective of this session is to cover the basics of spatial geometry. Computational geometry is heavily based on point and vector operations in space so it is useful to develop familiarity with a few core concepts. We will approach those concepts in a constructive manner, in the Euclidean sense, where we build understanding by step-wise executing a sequence of computable albeit geometric operations.
Points and vectors are ordered collections of numbers i.e. the position of the numbers in the collection is important, but the values themselves, unless otherwise expressed, are independent from one another. We use the bracket notation to express points and vectors “[a0, a1, a2, …, an-1]”, where “ai” are numbers. When we work with spatial points and vectors these numbers are real.
The number of elements in the collection “n” captures the size of the point or vector, or dimensions spanned. Examples of points and vectors of various dimensions include: 1D → [ 5 ], 2D → [ 6, 9 ], 3D → [ 3, 6, 0 ], 4D → [ 1.2, 3.4, 4.5, 5.6 ] etc.
For 2D, 3D and 4D points and vectors we use mnemonic symbols for each element such as “x”, “y”, “z”, “w” but this falls apart quickly for higher dimensions so instead we use numeric indices, as seen above { 0, 1, 2, …, n-1 }; it is just easier.
We may consider a point as a generalization of a single number. As a single number represents a position on the real line, so do points in higher dimensions capture the notion of a location in reference to a zero point or origin. As the number “5” captures the notion of five units away from the origin, so does the point [2, 3] in the standard XY plane, captures the notion of “2” units along the X-direction and “3” units along the Y-direction, combined.
Generally, points have implied units of measurement. For instance points in space imply linear units of length such as meters, millimetres etc. We do not write those down but it is important to not forget that they exist. Otherwise we may get into the apples and oranges problems of mixing quantities that we shouldn’t have.
Vectors are the equivalent of displacements between positions. In the 1D world of single numbers or “scalars”, a vector between positions “5” and “3” captures the amount of travel from one location to another. This can be “2” units from “3” to “5” and symmetrically, “-2” units from “5” to “3”.
Note how vectors, capture two semantic concepts: (a) the amount of travel i.e. “2” units in absolute sense and (b) the direction of motion i.e. by the sign “+/-” in this scenario. The same concepts are applicable to all higher dimensions.
While semantically a point and a vector represent different ideas, namely an absolute position versus a relative displacement, we can treat them interchangeably i.e. freely mix with one another. The reason for this is because points can be considered as vectors i.e. displacements from an implied zero origin.
To construct vectors from two points, we just pairwise subtract their coordinates. While points are automatically displayed on screen, vectors require the use of the “vector display” component.