Hi everyone
I have 3 Questions here. Consider the below code.
import plotly.figure_factory as ff
import numpy as np
from scipy.spatial import Delaunay
u = np.linspace(0, np.pi, 24)
v = np.linspace(-1, 0, 8)
u,v = np.meshgrid(u,v)
u = u.flatten()
v = v.flatten()
z = np.sin(u/2)#*0+1
points2D = np.vstack([u,v]).T
tri = Delaunay(points2D)
simplices = tri.simplices
fig = ff.create_trisurf(x=u, y=v, z=z,
colormap="Portland",
simplices=simplices,
title="Mobius Band")
fig.show()
1- What should I do if I want to draw a horizontal or vertical surface? When I change the values to z = np.sin(u/2)*0+1
I get error and seems it has emphasis that the surface shouldnβt be horizontal or vertical!?
2- What is the meaning of below 3 lines in above code and what are they doing?
points2D = np.vstack([u,v]).T
tri = Delaunay(points2D)
simplices = tri.simplices
3- I need to draw a surface that some parts of this surface is horizontal and some part is vertical and some part is with slope and it is very important for me to use only one command for this purpose (I have all points in x,y,z variables) and I donβt want to use loops. Is there any method better than plotly.figure_factory.create_trisurf
? Do you have any suggestion?
Thanks