1 function rs = test5(test,like_spline)
6 fire_cone = @(x,y) cone_slope*sqrt(( x.^2 + y.^2));
8 % if ~exist('like_spline')
9 % load spline_data.mat;
10 % [ls,fit1] = createFit(t,log_like);
14 position = linspace(-10,10,grid_size);
15 [x,y]= meshgrid(position,position);
28 slice_time = [47 49 51];
29 fires = zeros(size(x));
39 x_dex = (fire_z-b)/cone_slope;
40 scatter3(fire_x,fire_y,fire_z,'r*');
43 fires(30:40,30:40) = 5;
47 input_time = slice_time(i) - z;
48 temp = like_spline(input_time(fires > 7));
49 tot = tot + sum(temp);
50 t1 = like_spline(input_time(fires < 1));
51 temp = log(1 - exp(1).^t1);
58 % move fire pixel across
60 input_time = slice_time(2) - z;
61 tots = zeros(1,grid_size);
63 scatter3(x(g,i),y(g,i),slice_time(2),'r*');
66 temp = like_spline(input_time(t_mask > 7));
67 tots(i) = tots(i) + sum(temp);
68 t1 = like_spline(input_time(t_mask < 1));
69 temp = log(1 - exp(1).^t1);
70 tots(i) = tots(i) + sum(temp);
73 figure,plot(x(g,:),tots);
77 contour3(x,y,z,[49 49],'k')
78 fires = 5*ones(size(x));
80 x_coords = 1+round(2*g*rand(1,num_pts));
81 y_coords = 1+round(2*g*rand(1,num_pts));
82 %figure,scatter(x_coords,y_coords);
85 radius = slice_time(2)/10;
86 angle = linspace(0,2*pi);
87 perim = zeros(length(angle),2);
88 perim(:,1) = radius*cos(angle)';
89 perim(:,2) = radius*sin(angle)';
90 plot(perim(:,1),perim(:,2),'k')
93 u = x(x_coords(i),y_coords(i));
94 v = y(x_coords(i),y_coords(i));
96 if abs(zt - radius) < 2 && zt < radius%49
97 fires(x_coords(i),y_coords(i)) = 9;
101 fires(x_coords(i),y_coords(i)) = 0;
104 fires(x_coords(i),y_coords(i)) = 9;
112 %times = linspace(min(z(:))+1,max(z(:))-1,num_slices);
113 times = linspace(20,70,num_slices);
114 tots = zeros(size(times));
116 input_time = times(i) - z;
118 temp = like_spline(input_time(t_mask > 7));
119 tots(i) = tots(i) + sum(temp);
120 t1 = like_spline(input_time(t_mask < 1));
121 temp = log(1 - exp(1).^t1);
122 tots(i) = tots(i) + sum(temp);
125 figure,plot(times,tots)