This project titled The Conurbation Algorithm is aimed at developing a fully functional featured city without disrupting the ecological density of the city. It was the winning project of my first hackathon Electrothon 2k20 at NIT Hamirpur. It is a further modification of the initial city generation model.

In this blog I shall give a brief overview of the workflow of this project. I am not going to touch the coding part as of now so as to prevent the things from being more complicated to comprehend.

licenseProject StatusProject Status: Active – The project has reached a stable, usable state and is being actively developed.

Python BadgeDependency

Challenges :

  • Migrating the the code from PyQt4 to PyQt5 and updating the code with the new dependencies.
  • Automating the Blender Scripts to run directly from the PyQt5 GUI.
  • Cleaning the code to remove all the version conflicts.
  • Generating the new map to run the test scripts.
  • Updating and modifying the codes for growth rules.

Input -

The input to the conurbation algorithm is the map generated from the project Land Stratification.

The growth rule image defines the formation of road network of the town that is created.

Well we need a road network to traverse across the town, isn’t it?

Blue color implies a radial growth rule(roads originate from a single junction), red colour indicates grid growth rule(like we have in properly planned cities-proper block division) and green colour depicts organic(random) growth rule.

Dependencies -

  • Python 3.x
  • Numpy
  • matplotlib
  • Blender
  • PyQt5
  • Scipy

Workflow -

Steps to replicate the Program

  • Clone this repository
  • Change all the paths in the files GUI.py and blenderize.py.
  • Remove all the pycache files from the cloned folder if present.
  • Check all the installed dependencies.
  • Install and add blender to the environment path.
  • Run the script GUI.py.

If everything worked so far, the PyQt5 window should openup and the algorithm should generate the city with the clicks.Make sure to run all the tabs in order,i.e., Roadmap Generation-> Polygon Extraction -> Building Generation ->Visualise in Blender.

Feel free to experiment with growth rule images and Density images and open a pull request for further modification of the project.

Sample Outputs-

1. Roadmap Generation

2. Polygon Extraction

3. Building Generation

4. 3D Visualisation of Buildings in Blender

References -