function M = UR_MW_vis(airways,flight_plans,show_airways,del_t,...
    view1,view2)
%

clf
if show_airways==1
    UR_show_airways3D(airways,[],1);
end
hold on

corridors = airways.corridors;
num_flight_plans = length(flight_plans);
t = 0;
t_max = 0;
for f = 1:num_flight_plans
    t_f = flight_plans(f).data(end,2);
    if t_f>t_max
        t_max = t_f;
    end
end
count = 0;
%del_t = 0.5;
while t<t_max
    t = t + del_t
    count = count + 1;
    clf
    hold on
    UR_show_airways3D(airways,[],1);
    plot3(0,-3,0,'w.');
    plot3(600,3,600,'w.');
    view(view1,view2); % (3,3.6); (10,10.6);
    for f = 1:num_flight_plans
        f_data = flight_plans(f).data;
        [num_cor,dummy] = size(f_data);
        found = 0;
        for c = 1:num_cor
            t1 = f_data(c,1);
            t2 = f_data(c,2);
            if t>=t1&t<=t2
                ratio = (t-t1)/(t2-t1);
                end_pt1 = corridors(f_data(c,4),1:3);
                end_pt2 = corridors(f_data(c,4),4:6);
                dir = end_pt2 - end_pt1;
                dir = dir/norm(dir);
                c_len = norm(end_pt2-end_pt1);
                pt = end_pt1 + ratio*c_len*dir;
                plot3(pt(1),pt(2),pt(3),'ko');
%                text(pt(1),pt(2),pt(3),num2str(f));
                found = 1;
            end
            if found==1
                break
            end
        end
    end
    M(count) = getframe;
end
tch = 0;
