These objects can contain the points, lines and polygons of a tiling in “gridPoints”, “gridLines” and “gridPolygons” as well as the points, lines and polygons of its dual in “dualPoints”, “dualLines” and “dualPolygons”. Often they contain only points and lines of a tiling and the other data is left empty. Several such tilings are then put together using a procedure not contained here.
An important method is “addGridLine(a,b)”, where a and b are vectors for the endpoints of a line. These vectors are translated and rotated. Thus, we can for example easily generate two hexagon grids with different orientation. Then points at these places are looked up or created in “gridPoints”. A new line is finally created for “gridLines” and put in the list of connections of the endpoints.
Finally, “makeDual()” is very important. It creates the dual tiling.