The basic element of geometry is a point or vector. We could use the PVector class of processing to work with vectors in 2 and 3-dimensional space. However, this is not really efficient for 2-dimensional vectors, because their z-component is simply put equal to zero and the calculations are done in 3-dimensional space. I wanted to have a more efficient class for vectors because image manipulation uses for each pixel a vector. Then, reducing data by one-third becomes important. Thus I made up a class called Vector, see the next post “class Vector – the code“.
Vector has approximately the same methods as PVector. You find them in the source code. I have added diagnostics that show the position of a vector or print its value.
In later posts you will see how iterative methods for tessellations can be easily programmed with the class “Vector”. But for the projection method and the dualization method we will need more, such as classes for lines and polygons.