I was trying to implement a cuboid and expressed it by triangle mesh. It is easy to implement a surface of a cuboid so that I wanted to try to implement the cuboid by creating six surfaces and merge them together. However, when I tried to draw a mesh surface that is vertical to the ground there is an error I can not understand:
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
x = np.random.rand(20)
y = [0] * 20
z =np.random.rand(20)
ax.plot_trisurf(x, y, z)
plt.show()
RuntimeError: Error in qhull Delaunay triangulation calculation: singular input data (exitcode=2); use python verbose option (-v) to see original qhull error.
If I switch the value of y and z it can work properly and draw a surface which is parallel to the ground.