Is there any way to give mayavi a list of tuples, or maybe some numpy array of number_of_points x 3 size, such that I can specify different colour for each point?
So, I have the following data:
x of size Nx1 (contains x coordinates of N points)
y of size Nx1 (contains y coordinates of N points)
z of size Nx1 (contains z coordinates of N points)
R of size Nx1 (contains the values for the R channel of N points)
G of size Nx1 (contains the values for the G channel of N points)
B of size Nx1 (contains the values for the B channel of N points)
I want somehow to give this RGB data to mayavi so it will use the actual colour of the point, so I would like something like this:
from mayavi import mlab
plt = mlab.points3d(x, y, z, color = (R, G, B))
This works if N = 1, or with other words, only if I gave Mayavi a single point, otherwise it doesn't. Thus, I can iterate it, but it is very slow and hard on memory for some reason.
I've tried many things, but I can't seem to find a single approach (apart from doing it in a loop) that does what I need. Any ideas on how to do it?