avi file creation problem

2 views (last 30 days)
Maciej
Maciej on 12 Jul 2012
I would like to create avi file with 3D simple animation. To do this, I am using getframe and addframe functions. The problem is the generated avi file in Media Player is motionless. I would be really appreciate for any comments.
My code:
aviobj = avifile('3Danim.avi','compression','None');
aviobj.quality = 100;
fig = figure;
plot3D % script ploting 3d figure
axis vis3d
numOfFrame = 360;
for d = 1:numOfFrame
camorbit(1,0,'data',[0 0 1])
Frame = getframe(fig);
aviobj = addframe(aviobj,Frame);
end
close(fig);
aviobj = close(aviobj);
My software: Windows 7, matlabR2011a
Regards, Maciek
  2 Comments
Maciej
Maciej on 12 Jul 2012
anybody?
Bill Stanton
Bill Stanton on 19 Jul 2012
I have the same problem. I want to create a movie of moving the camera around a 3D surface plot. The resulting movie shows the surface plot moving side to side rather than rotating around it.
for i = 1:1:45
camorbit(1,0);
pause(0.1);
M(i) = getframe;
end;
I am using R2011b (64bit) on Windows 7.
Thanks in advance for any insight. --bjs

Sign in to comment.

Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!