Production engines

A city from a seed: streets, blocks, lots, buildings and parks.

Makes a city from a seed number and a size (the side of a square, 300 to 2000 metres, 800 by default): streets at varied spacing, closer together toward the centre, some of them curving, some ending at a cross street so blocks vary in size, an avenue every few, one or two diagonal avenues and usually a ring road. The town does not fill the square: it thins toward an outline of its own (answered as outline), lots grow and houses scatter toward the edge, most streets stop short of it and a few avenues run on out of the square, and the ground beyond the town holds fields, pastures and copses (answered as fields, each clear of every road, hedged by trees). Between the dense core and the outskirts lies a suburban ring: residential streets that curve and branch (crescents that leave a street and return to it, cul-de-sacs ending in turning circles), small lots marked suburban, each with a house of one or two floors turned to its street and set back from it (a building's kind says house, semi for a pair, shop on a corner or school on a large lot, and the view, the obj and the glb roof them with pitched roofs), the houses lining both sides of narrow residential streets (about seven metres wide, with lanes running into deep blocks) and a garden with trees round every house, and a few local parks. The blocks the streets leave, with a plaza near the centre and parks; the lots each block divides into; and the buildings, each a footprint with a height and a floor count, rising toward the centre. Footprints are cut along the roads' own lines (a building beside a diagonal avenue is a trapezoid or a wedge, never a staircase), a block the buildings would leave mostly empty becomes a park, a lot left unbuilt is a yard with trees (a paddock, hedged, in the outskirts), and every park carries footpaths from street to street, benches beside them and trees kept clear of them. formats picks the files (json, png, obj, glb; json, png and glb by default): city.json is the plan, every street as a polyline with its kind and width and every block, park (with its trees), lot and building footprint as an outline, in metres with x east and z south from the middle of the square; city.png is the plan seen from above, north up, px pixels a side (256 to 2048, 1024 by default), buildings shaded by height; city.obj and city.glb are the massing model, the ground, streets, parks and every building extruded to its height, in metres with y up. terrain (a seed word, as terrain_heightmap takes) stands the city on that country's ground instead of a plane, centred at origin {x, z} in metres (0, 0 by default) with relief 0 to 40 as terrainAmp: every lot is levelled to a terrace and its buildings stand on it, every road point carries a height (y, held to a 12 percent grade by cutting and filling), a building whose corners would be more than 2.5 metres off its terrace stands in steps (its footprint is cut across the fall into pieces, each on its own base, and the answer counts those buildings as stepped) and is left out only where even that cannot hold the ground (counted as tooSteep, with the ground's low and high), two roads that meet carry one height at the junction, the terraces fade into the country over a fifty metre apron whose edge heights are listed under terrain.apron, the picture is shaded by the relief, and the obj and glb carry the terraced ground, apron included, with the streets lying on it. view (a list of cameras from aerial, a high oblique over the whole square, corner, a low oblique from the south-east, and skyline, a low view from the south across the roofs) also draws the massing model lit, with an afternoon sun, shadows and sky, as city-view-<camera>.png at viewPx pixels wide (320 to 1600, 960 by default, two thirds as tall), country shown round the square: it is the picture of what the other files hold, for when there is no model viewer to open them in. Where a stepped building's pieces meet on a slope, each uphill piece lists its seam (the shared edge and the drop) and the obj and glb carry a retaining wall there; a park on the edge of a hill follows the ground instead of a terrace (graded), the city's surface at its edge is held within three metres of the country's, and the picture shows the apron's fifty metres past the square. The answer carries the counts, the tallest building, the mean heights of the core and of the edge and the plan's sha256. The same seed and size give the same city. Costs 1 unit; views add to it (three wide views of the largest city cost 2).

post/api/agents/run/city_plan

Request

  • Base URL: https://tomorrowlives.com
  • URL: https://tomorrowlives.com/api/agents/run/city_plan
  • Auth: HTTP bearer

Request body

seedinteger required

A whole number that makes the city; the same seed and options give the same plan.

sizeinteger

The side of the city square in metres, 300 to 2000 (default 800).

formatsstring[]

Files to return: json, png, obj or glb.

pxinteger

Width in pixels of the plan picture, 256 to 2048.

viewstring[]

Camera views of the massing to render: aerial, corner or skyline. Each adds to the cost.

viewPxinteger

Width in pixels of each view, 320 to 1600 (the height is two thirds).

terrainstring

A terrain seed word to build the city on, so it sits on that country.

reliefnumber

How far the ground may rise and fall under the city, in metres, 0 to 40.

Response

The job's result and files

jobstring
verbstring
unitsinteger
msinteger
resultunknown

Changes

No recorded changes to this operation across all 1 revision of this API.