I want to plot thousands of objects in 3d using surf plot. My code looks like this
% src is an m x 3 matrix. Each row is the x, y and z coordinate of an object.
[sx, sy, sz] = sphere; for ii = 1 : length(src) surf(sx+src(ii,1), sy+src(ii,2), sz+src(ii,3)) end
There are up to 3000 objects that I want to plot and it takes roughly 30 secs to render. I'm wondering if there is any way to speed this up? I tried very naively with parfor, which ended up with nothing at all. I'm also wondering why parfor won't work?
Best Answer