MATLAB: How to visualise 10000 cell volume

MATLABvisualisation

I have tried to view this system in 3D using patch. It is very slow. I've seen other software do this much much faster, even with transparency. What am i missing?

Best Answer

Load nodes and faces in a unique structure and plot all patches in a single command
tic
nodes = []; faces = [];
for i = 1:length(PatchWork)
faces = [faces; PatchWork{i}.FaceVertices+size(nodes,1)];
nodes = [nodes; PatchWork{i}.VertexXYZs.'];
end
figure
patch('Faces',double(faces),'Vertices',nodes,'FaceColor','red');
view([1 1 1]);
toc
>> Elapsed time is 1.018881 seconds.
Related Question