Recreating gif style figure on Spherical Harmonics read me

I am looking to recreate this figure and was curious what tools were used to generate it, and how the ‘error’ is found/calculated here (MSE?) Thank you!

Hi! Meshes are generated in Python and saved as .vtk files. These files are open in Paraview for the final 3D visualization. The error is computed as follows. For each point in the reconstructed mesh we find the nearest point in the original mesh and compute the distance between them. The process is repeated for all points and the error corresponds to the average distance between all pairs of points. Let us know if you have more questions.