Problem with getframe with trisurf when making movie

3 ビュー (過去 30 日間)
Renbo
Renbo 2014 年 9 月 16 日
コメント済み: Renbo 2014 年 9 月 22 日
I want to make a movie use getframe and VideoWriter to view a 3D dataset at different view angle. First, i use scatter3 to plot 3D dataset, and use getframe and VideoWriter. It works perfect. However, when i use trisurf to plot the surface of dataset,and use exactly the same code to as above. But i found the the frame in this movie does not change over time, and it is a 2D image instead of 3D.
Are there some meet the same problem? Many thanks.
writerObj = VideoWriter('ColorGamutDTri.avi');
writerObj.FrameRate = 80;
open(writerObj);
n=-180;
while(n<180)
view(n,10);
n=n+1;
pause(0.1);
frame = getframe(gcf);
writeVideo(writerObj, frame);
end
close(writerObj);
  8 件のコメント
Geoff Hayes
Geoff Hayes 2014 年 9 月 22 日
Glad that you got it tow work, Renbo!
Renbo
Renbo 2014 年 9 月 22 日
I can't make it without your help. Thanks. Cheers.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeAnimation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by