| CityEngine [1] does that. It's a procedural city generation engine first presented at SIGGRAPH 2001, by Procedural Inc., an ETH Zürich spinoff that was later acquired by ESRI (ArcGIS). At its core is a shape grammar based on L-Systems [2] that is used to define how a road network is subvided into lots, then buildings etc.. with increasing level of detail and contextual constraints. You give it a vector road network and the grammar rules, and it subdivides it spacially into e.g. Lots
> Buildings
> Roofs
> Stories
> Facades
> Windows
> Frame
> Glass pane
> Ledge
etc., according to the desired level of detail. Context dependent rules control that e.g. doors may only be placed on the ground floor, or the the roof goes on top of the top floor.The original paper and presentation at SIGGRAPH described the simplicity of the core idea quite beautifully, but I'm having a hard time finding them now. This old tech demo video [3] should give an idea of how it works though. [1] https://en.wikipedia.org/wiki/CityEngine [2] https://en.wikipedia.org/wiki/L-system [3] https://www.youtube.com/watch?v=SxyOTUzm2qw |
Shape Grammars are interesting. Closely related to L-systems but usually with a more approachable syntax.
Also see https://github.com/stefalie/shapeml