1: function
2: if then
3: If a subgrid in R has been populated, already exists
4: Select from
5: else
6: PD ¬ Construct the boundary of D
7:
8: end if
9: return
10: end function