Gradovi is a city generator project I worked on while finishing my studies at the Belgrade University. It generates city streets using many of the methods described in Parish and Müler’s Procedural Modeling of Cities paper. The core of the algorithm is built around L-systems, which are used to iteratively “grow” the city.

Two types of street growth rules are implemented – radial and rectangular. These are based on the most typical types of city topologies occurring today. The rectangular rule is representative of polycentric cities, while the radial rule resembles monocentric ones.

Manhattan and Paris – typical examples of the two types of topologies. Manhattan and Paris – typical examples of the two types of topologies.

The generator is parameterized with 10+ values controlling various aspects of the growth, some of which are shown below.

The rectangular and radial topologies as created by the generator. The rectangular and radial topologies as created by the generator.
Roads can be parameterized to follow the slope of terrain (left), or to ignore it (right). This is a continuous parameter which can be tweaked until just the right amount of “slope following” is found. Roads can be parameterized to follow the slope of terrain (left), or to ignore it (right). This is a continuous parameter which can be tweaked until just the right amount of "slope following" is found.
Since the generator is based on an L-system, the number of generations is configurable. Stepping through generations is also supported, so city growth can be directly visualized. Since the generator is based on an L-system, the number of generations is configurable. Stepping through generations is also supported, so city growth can be directly visualized.

Source code is available on GitHub.