Several algorithms for enumerating points in an unbounded plane
This is not a library or a tool. I am not even providing a
Makefile or build instructions.
Four different ways of mapping a single integer to a point in a plane.
- zigzag ( only block 0 <= x,y <= w )
- triangle shape ( includes only the x,y >=0 quadrant )
- diamond shape ( full plane )
- spiral ( full plane )
zigzag, and spiral always make steps of distance
diamond and triangle make steps of either
Each enumeration algorithm implements two functions:
pt2n, the first converts an integer to a point, the second converts a point to an integer.
- add block for enumerating entire plane in block shape.
- add half-plane enumerator
- add volume enumerators:
- octant in tetrahedron shape
- space in cube shape
Willem Hengeveld email@example.com