Implement basic mesh generation.