Example mesh generator in Python