After a long thread on texture mapping https://community.plotly.com/t/applying-full-color-image-texture-to-create-an-interactive-earth-globe/60166/5, and a partial solution (only for grayscale images), suggested along the last years,
here is the workaround for color images, with surprisingly good results https://chart-studio.plotly.com/~empet/16132.
The regular triangulation involved in meshing a surface looks like this
z_data is an array of shape (
image_columns). Hence we have an intensity value for each point in the meshgrid
np.meshgrid(np.linspace(a, b, image_columns), np.linspace(c,d, image_rows))
defined on the rectangular region mapped to the surface.
But the number of cells (faces) resulted from the regular triangulation is different from that in
z_data.flatten(). That’s why I defined a rule that assigns to each cell a
z_data value, like in the above image.