How it works...

We first generate 50 random points using np.random.rand function, which generates numbers between 0 and 1. The tri.Triangulation() function creates triangles automatically, whereas plt.triplot() plots the triangulation plot.

This is how the output plot looks: