Dynamic Color Scanner
This activity belongs to the GeoGebra book Voronoi Paintings.
Calculating the Voronoi diagram of a collection of shapes with precision requires quite a bit of work, even if we limit ourselves to circular or polygonal shapes. We need to calculate each line or conic section involved in the path, as well as their intersections, and filter the appropriate segments or arcs. With GeoGebra, for example, these constraints involve the prior parameterization of each conic section, as we need to draw segments or arcs.
Alternatively, we can use the method with which Figure 3 was created. It involves sweeping the screen, highlighting those points whose difference in distances to the two nearest shapes is very close to zero. This approach sacrifices some accuracy but gains versatility and saves a lot of time.
With GeoGebra, this sweep is achieved by creating what we call a dynamic color scanner, see [8, 9]. It consists of a column of points (for Figure 3, 400 points were used) with the trace activated. The movement of the entire column is governed by a single numerical slider. The color of each point in this column varies from white to black based on the difference in distances to the pair of closest shapes, so that, by animating the slider, only the points practically equidistant from those shapes darken, visualizing the Voronoi diagram in this way.
Author of the activity and GeoGebra construction: Rafael Losada.