Operations for the Simple Square Park

  1. Grid operation creates crossroads with custom centre and subtracts it from the square polygon resulting in a one path region and 4 non-walkable regions.
    op1 - extract paths from square region
  2. Extract the place holder for the fountain in at the centre of the crossroads. (Alternatively: just place the fountain in the centre)
    op2 - cut the placeholder in the centre for the fountain
  3. We deal with each of the 4 non-walkable regions by applying the same operation, mirrored against the paths accordingly. We use Peel operation to split the outer edge into a L-shaped polygon. It is subsequently filled with trees
    op3 - peel outer edge
  4. Ground area for the tree is inserted in the inner park polygon which represents a Grass Area. To avoid holes (see previous post) the Grass Area is split in two.
    op4 - insert place for a tree
  5. Finally bush volumes are added. This is done by parametrising the perimeter of the containing polygon and contracting it. Arbitrary subset of the perimeter can be used to create a path which is then extruded into a volume.
  6. Placement of trees and fountains as external models is performed at the end (picture not shown).

For this example the grammar shall look like this:

Region -> Grid(2, 2) { ParkQuarter } { ParkPath } { Romb(3) Fountain }

ParkQuarter -> Peel(OUTER) { 0.75: TreeStrip | GrassRegion }

TreeStrip ->  BLUE_GRASS
Distribute (OUTER_EDGE: 0.375, 2) {TallTree}

GrassRegion -> GREEN_GRASS
Place( CENTRE) { TreeRegion }
DistributeSmooth( Boundary1(Perimeter))  { Bush }

fun Boundary1(area) ->
Parametrise([0.02,1], [0, 1], [0, 0.15], 0) { Contract(1, area) }

TreeRegion -> Circle (1)
Place (CENTRE) { Tree }

TallTree -> loadModel(“talltree”)

Tree -> loadModel(“tree”)

Fountain -> loadModel(“fountain”)