Skip to content

five-on-it / packages/catalogue/src/city/terrain

packages/catalogue/src/city/terrain ​

A city's terrain over its flat town: what relief, a road's tunnel, lakes and a district's compound add, resolved and checked here before Blender builds anything.

  • The relief (reliefOf): the town's own ground, the rises (a bell) and the slopes (a smooth step between two lines) added together. Blender builds the city flat and lifts every point by the relief's height there, its buildings on level pads (city.py). Its checks: no feature steeper than 25% (lots to build on), no street climbing more than 12% over it, the water, the roundabouts, the lakes and the compounds where it is level.
  • The tunnels (tunnelsOf): a road with tunnel runs under the hills in its way at its own level; where the land stands TUNNEL.clear and more over it, across its cutting, for TUNNEL.minLength and more, it is in a tunnel, built as a region's are (region/tunnels.ts: the roof over the cutting that fades over a player under it, the portals, the lights), its meshes in the plan; elsewhere in the hill a cutting.
  • The lakes (lakesOf): their shores on the map, each off the hills, clear of the rivers (their water stands at two heights) and of the roads' pavements, where the relief is level; their surface half a metre under the ground round them.
  • The compounds (compoundsOf): a district's largest rectangle free of its streets' pavements, the water, the parks and the lakes (compounds.py lays its walls a strip of lawn inside it), 78 m a side at least, its main gate's wall facing a street.

In the map's frame (Blender's: X east, Y north), as the rest of the solver; the plan's points are the game's.

Interfaces ​

Functions ​