Larry Ellison's Driveway (a.k.a. CS270 Project)


Approach

The requirement of only 50 unique stone designs prevents the straight forward application of the Voronoi tessellation of a perturbed grid. To try to reduce the number of unique stones, we can perturb each point by one of a set of fixed amounts rather than perturbing each point by a random amount. Since the location of a point and its neighbors determines the shape of a Voronoi polygon, limiting the possible locations limits the number of unique stones.

To reduce the number of distinct polygons (stones) by as much as possible, only two locations are selected. The first is on-center of the grid, and the second is perturbed by some amount from the center of the grid. Whether the point is left on-center or perturbed is decided using a pseudo-random number generator with a 50% probability. By storing only the seed of the random number generator, the entire pattern can be saved.

The following illustrates one such Voronoi cell, formed by perturbing up and to the right from a grid by 0.2 units.



One Voronoi Cell

By extending this to a large section of the plane, we can produce a full tessellation. The following figure shows such a tessellation. The offsets in this case are larger than in the example above. There are 78 unique stones out of 400 total in the center 20x20 section.



Tessellation based on a square grid, 78 unique stones

Another alternative is to base the pattern on hexagons, rather than squares. This can be achieved by offsetting every other row by half the inter-point distance. Taking this approach leads to the following image, with 133 unique stones.



Tessellation based on a hexagonal grid, 133 unique stones

Side Note

To compute the number of unique stones, the Voronoi cells are output one at a time. If the stone hasn't already appeared, it is added to a list of unique stones, and the number of unique stones is incremented. Also, since the same stone can be used upside down, the reflection of the stone is also added to the list of stones. If a Voronoi cell matches a stone on the list, it is ignored.

To compare two stones, the points are first translated to the center of mass. If vertex 1 of stone A matches vertex i+j (or i-j) of stone B for any i and all j, then the stones match.

It is possible to specify a tolerance for the match. For example, this allows stones to be considered identical if their points match within the grout distance. The quoted number of unique stones all assume a tolerance of 3/8 of an inch, although this only reduces the number of unique stones by one for the example above.

Local Patterns

The first objection to the pattern based on the rectangular layout was that some areas had a regular, grid-like appearance. These areas also tended to have four stones meet in one place. A method was needed to remove (or at least reduce) these regions.

Consider the likely shape of a Voronoi cell if an adjacent set of 2x2 points all end up with the same offset. As long as the neighboring points are distant enough so that the bisectors aren't clipped, the four stones meeting at the midpoint will share a common point, and meet at right angles.

To remove this case, we sweep through the points 2x2 at a time, and if all four have the same offset, the one in the lower right is flipped. Note that flipping one point can, at most, cause one other set of 2x2 points to have the same offset. So each flip either reduces the number of such points by one, or leaves the number the same. Since flipping along the edges can only reduce the number of such points, repeating the process will converge.

The following diagram shows the result using the same parameters as the above figure, but with all 2x2 points with matching offsets removed.



2x2 points with the same offset removed

Further Stone Count Reductions

Next, we need to reduce the number of unique polygons further. Since a pseudo-random number generator is used to determine whether each point is perturbed or not, it is a simple matter to reset the seed occasionally. Since the shape of a Voronoi cell is determined by the point in the center and it's nearest neighbors, and since the offset is small compared to the inter-point distance, the location of adjacent 3x3 points determines the shape of a stone. If the pattern of offsets in these 9 points repeats, the stone shape repeats.

Although this causes the pattern to repeat itself as well, as long as the regularity is not noticeable (e.g. spatially separated), this is not a problem.

The next image consists of 46 unique stones, in a pattern that repeats every 52 points (the order is bottom to top, then left to right). At first glance, it is difficult to perceive the regular repeating pattern.



Points repeat every 52. 46 unique stones.

Unfortunately, the same trick applied to hexagonal patterns doesn't work as well. It yields more polygons for a given repeat rate. This is caused by the fact that a hexagon pack more tightly than squares, and therefore have more neighbors.


Prev TOC Next

Adam Janin
janin@icsi.berkeley.edu