How can I plot around 1000 surfaces in 3D and with good speed?

조회 수: 4 (최근 30일)
Igor Arkhandeev
Igor Arkhandeev 2021년 4월 1일
편집: Matt J 2021년 4월 1일
Good day! I am plotting over 1000 surfaces with the command [x, y, z] = sphere; in one shape. Naturally, I end up with a very slow and heavy 3d render. How can I do it better?

채택된 답변

Matt J
Matt J 2021년 4월 1일
편집: Matt J 2021년 4월 1일
You can keep the axes invisible until all surfaces have been added.
  댓글 수: 3
Igor Arkhandeev
Igor Arkhandeev 2021년 4월 1일
편집: Igor Arkhandeev 2021년 4월 1일
I'm sorry, I never draw it. Can you rewrite my code follow your advice. Parameter a around 1000 - 1500.
[x, y, z] = sphere;
M = dlmread("Some_path.txt", '', 1, 0);
[a,~] = size(M);
for i = 1:a
surf(x + M(i,1), y + M(i,2), z + M(i,3));
end
Matt J
Matt J 2021년 4월 1일
편집: Matt J 2021년 4월 1일
[x, y, z] = sphere;
M = dlmread("Some_path.txt", '', 1, 0);
a=size(M,1);
for i = 1:a
h{i}=surf(ax, x + M(i,1), y + M(i,2), z + M(i,3),'Visible','off');
end
set([h{:}],'Visible','on')

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by