You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to plot mesh with Earth texture, but as a result, I got a shphere with a strange color. I suppose that problem with u and v, but I don't know how to fix it.
import PIL.Image
import numpy as np
import ipyvolume as ipv
image = PIL.Image.open('2k_earth_daymap.jpg')
R = 12742
u = np.linspace(0, 2 * np.pi, 100)
v = np.linspace(0, np.pi, 100)
x = R * np.outer(np.cos(u), np.sin(v))
y = R * np.outer(np.sin(u), np.sin(v))
z = R * np.outer(np.ones(np.size(u)), np.cos(v))
# u = np.array([x/5 +np.sin(k/8*np.pi)*4. for k in range(8)])
# v = np.array([-y/5*(1-k/7.) + z*(k/7.) for k in range(8)])
ipv.figure()
ipv.plot_mesh(x, z, y,u=y, v=x,wireframe=False,texture = image) #texture = image
# earth.texture = PIL.Image.open('2k_earth_daymap.jpg')
ipv.show()
The text was updated successfully, but these errors were encountered:
I'm trying to plot mesh with Earth texture, but as a result, I got a shphere with a strange color. I suppose that problem with u and v, but I don't know how to fix it.
The text was updated successfully, but these errors were encountered: