function _gridMap(idT, ingredients) {
            var shapeNumber = 0;
            var table = '';
            //create an array of arrays 10*10 of empty cells
            var cells = Array.apply(null, Array(10)).map(function() {});
            for (var r in cells) {
              cells[r] = Array.apply(null, Array(10)).map(function() {});
            }
            for (var x in ingredients) {
              for (var y in ingredients[x]) {
                var fill = void 0;
                if (x !== 'line') {
                  fill = '<a href="#'
                    .concat(idT, 'shape')
                    .concat(shapeNumber, '">')
                    .concat(ingredients[x][y].color, ' ')
                    .concat(x, '</a>');
                } else {
                  fill = '<a href="#'
                    .concat(idT, 'shape')
                    .concat(shapeNumber, '">')
                    .concat(ingredients[x][y].color, ' ')
                    .concat(x, ' midpoint</a>');
                }
                //if empty cell of location of shape is undefined
                if (!cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX]) {
                  //fill it with shape info
                  cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX] = fill;
                  //if a shape is already in that location
                } else {
                  //add it
                  cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX] =
                    cells[ingredients[x][y].loc.locY][ingredients[x][y].loc.locX] +
                    '  ' +
                    fill;
                }
                shapeNumber++;
              }
            }
            //make table based on array
            for (var _r in cells) {
              var row = '<tr>';
              for (var c in cells[_r]) {
                row = row + '<td>';
                if (cells[_r][c] !== undefined) {
                  row = row + cells[_r][c];
                }
                row = row + '</td>';
              }
              table = table + row + '</tr>';
            }
            return table;
          }
//the functions in this file support updating the grid output
@module Environment
@submodule Environment
@for p5
@requires core