I am new to Blender and I have a pretty basic question. I have a 3D numpy array of grass vertices that I would like to load and render in Blender. This is what I would normally do with numpy and matplotlib:
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
data_folder = '../data/seville/'
world_name = 'world5000_gray.mat'
matlab_world = sio.loadmat(data_folder + world_name)
X = matlab_world['X']
Y = matlab_world['Y']
Z = matlab_world['Z']
grass_verts = np.dstack((X, Y, Z))
p_grass = Poly3DCollection(grass_verts,
array=colours[:,0],
edgecolor='none',
cmap=grass_cmap)
…some code missing…
The question I have is, how do I do this from within the Blender scripting environment?