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.
5 % the first frame is chosen as the snapshot at end time in order
6 % to have a useful preview. As the initial dist will be identical
7 % for different parameters
9 % Bernard Haasdonk 25.5.2008
11 load nonlin_symmetry_detailed
19 outputfn =
'rb_nonlin_symmetry1.mpg';
22 outputfn =
'rb_nonlin_symmetry2.mpg';
25 % outputfn =
'rb_burgers3.mpg';
26 % mu_sequence = {[-1,0]};
28 % outputfn =
'rb_burgers4.mpg';
29 % mu_sequence = {[-1,-pi/4]};
31 error(
'movie number not specified');
33 %outputfn =
'rb_burgers1.avi';
34 %mu_sequence = {[1,0],[1,-pi/8],[1,-pi/4]};
35 %text_sequence = {
'\phi = 0',
'\phi = -\pi/8',
'\phi = -\pi/4'};
37 offline_data = rb_offline_prep(detailed_data,params);
38 params.N = size(detailed_data.RB,2);
39 params.M = size(detailed_data.QM{1},2);
41 %params.vrot_angle = 0;
42 %params.c_init_lo = 1;
45 %compression =
'None';
46 %compression =
'Cinepak';
47 %compression =
'Indeo5';
48 %compression =
'IV50';
49 %compression =
'Indeo5'; % Indeo3, Cinepak, MSVC, RLE, None
52 %mov = avifile(outputfn,
'Fps',fps,
'Quality',quality,...
53 %
'Compression',compression);
56 % params.clim = [0,1];
59 params.show_colorbar = 1
65 for i = 1:length(mu_sequence)
68 params = params.set_mu(mu_sequence{i},params);
69 reduced_data = rb_online_prep(offline_data,params);
70 simulation_data = rb_simulation(reduced_data,params);
71 Uappr = rb_reconstruction(detailed_data,simulation_data);
74 plot_element_data(detailed_data.grid,Uappr(:,end),params);
75 text(0.1,0.9,text_sequence{i},
'FontSize',30,
'Color',[0,0,1])
79 for j = 1:size(Uappr,2)
82 plot_element_data(detailed_data.grid,Uappr(:,j),params);
83 text(0.1,0.9,text_sequence{i},
'FontSize',30,
'Color',[0,0,1])
85 F(j+1) = getframe(gca);
88 % mov = addframe(mov,F);
94 mpgwrite(F,C,outputfn,...
95 [1, 0, 1, 0, 10, 1, 1, 1]);