Mercurial > repos > public > sbplib
annotate +anim/setup_img_mov.m @ 86:3c39dd714fb6
In Curve: Added numerical FD differentiation if derivative is not supplied. Added arc length computation based on the derivative. Added arc length parameterization (but this function is very slow.). In +util: Added fzero_vec.m and integral_vec.m, which call fzero and integral but take vector arguments.
author | Martin Almquist <martin.almquist@it.uu.se> |
---|---|
date | Sun, 29 Nov 2015 14:28:53 +0100 |
parents | 48b6fb693025 |
children |
rev | line source |
---|---|
0 | 1 function save_frame = setup_img_mov(dirname,filename_prefix,ulim,map,F) |
2 default_arg('map',parula(256)); | |
3 default_arg('F',@(x)x); | |
4 | |
5 fresh_dir(dirname); | |
6 | |
7 n = size(map,1); | |
8 | |
9 frame_nr = 0; | |
10 function save_frame_F(Z) | |
11 filename = sprintf('%s/%s%04d.png',dirname,filename_prefix, frame_nr); | |
12 z = uint8(F(Z)/ulim(2)*n); | |
13 imwrite(z,map,filename); | |
14 frame_nr = frame_nr + 1; | |
15 end | |
16 | |
17 save_frame = @save_frame_F; | |
18 end |