1 % small script generating a movie of simulation sequences
3 % the problem with avi capturing is, that powerpoint cannot
4 % properly play these clips. So
using package mpgwrite here.
6 % Bernard Haasdonk 25.5.2008
8 load burgers_fv_detailed_data
15 outputfn =
'rb_burgers1.mpg';
16 mu_sequence = {[1,0]};
18 outputfn =
'rb_burgers2.mpg';
19 mu_sequence = {[1,-pi/4]};
21 outputfn =
'rb_burgers3.mpg';
22 mu_sequence = {[-1,0]};
24 outputfn =
'rb_burgers4.mpg';
25 mu_sequence = {[-1,-pi/4]};
27 error(
'movie number not specified');
29 %outputfn =
'rb_burgers1.avi';
30 %mu_sequence = {[1,0],[1,-pi/8],[1,-pi/4]};
31 %text_sequence = {
'\phi = 0',
'\phi = -\pi/8',
'\phi = -\pi/4'};
33 offline_data = rb_offline_prep(detailed_data,params);
34 params.N = size(detailed_data.RB,2);
35 params.M = size(detailed_data.QM{1},2);
37 %params.vrot_angle = 0;
38 %params.c_init_lo = 1;
41 %compression =
'None';
42 %compression =
'Cinepak';
43 %compression =
'Indeo5';
44 %compression =
'IV50';
45 %compression =
'Indeo5'; % Indeo3, Cinepak, MSVC, RLE, None
48 %mov = avifile(outputfn,
'Fps',fps,
'Quality',quality,...
49 %
'Compression',compression);
52 % params.clim = [0,1];
55 params.show_colorbar = 1
61 for i = 1:length(mu_sequence)
64 params = params.set_mu(mu_sequence{i},params);
65 reduced_data = rb_online_prep(offline_data,params);
66 simulation_data = rb_simulation(reduced_data,params);
67 Uappr = rb_reconstruction(detailed_data,simulation_data);
69 for j = 1:size(Uappr,2)
72 plot_element_data(detailed_data.grid,Uappr(:,j),params);
73 text(0.1,0.9,text_sequence{i},
'FontSize',30,
'Color',[0,0,1])
78 % mov = addframe(mov,F);
84 mpgwrite(F,C,outputfn,...
85 [1, 0, 1, 0, 10, 1, 1, 1]);