La forma más eficiente de dibujar un montón de líneas 3d en matlab

Necesito trazar una lista de líneas 3d en matlab. ¿Cuál es la forma más rápida de hacerlo? Actualmente estoy haciendo algo como

%edges is a MX2 matrix, holding the list of edges
%points are the vertices' coordinates
hold on; %so all the lines will be saved
for i=1:size(edges,1)
    a=edges(i,1); %get first point's index
    b=edges(i,2); %get second point's index
    p=[points(:,a) points(:,b)]; %construct a 3X2 matrix out of the 2 points
    plot3(p(1,:),p(2,:),p(3,:)); %plot a line
end

Pero esto no solo es lento durante el bucle real, sino también al final, la trama resultante es muy lenta e irresponsable cuando intento, por ejemplo, rotarla usando la herramienta de arrastrar y rotar .

Sé que la misma trama usando opengl, etc. se ejecutaría mucho más rápido ...

6
задан olamundo 21 August 2011 в 11:37
поделиться