
bottom = [];
maxdepth = 50;
increment = 10;
northing0 = 4062000;
easting0 = 594000;
for( z = maxdepth:-1:20 )
  for( x = [-35:35 ] )
    for( y = [-35:35 ] )
      if( z < maxdepth )
	if( abs(x) < increment && abs(y) < increment )
	  %We're in the cavity.  Don't add points.
	else
	  bottom(end+1,:) = [x y z];
	  plg.z(x+36, y+36) = z;
	  plg.northings(x+36,1) = x;
	  plg.eastings(y+36,1) = y;
	end
      else
	bottom(end+1,:) = [x y z];
	plg.z(x+36, y+36) = z;
	plg.northings(x+36,1) = x;
	plg.eastings(y+36,1) = y;
      end
    end
  end
  increment = increment+1;
end

csvwrite('testBottom.csv',bottom);
save('testBottom3')
