% m-file: missing_data_line_01
% Demonstration of origin of artefact line due to missing data for interpolation
% For an explanation, please see 
%   http://localhost/www/vyzkum/rotating_3d_globe/rotating_3d_globe/manual.html#trbb3
% Ales Bezdek, bezdek@asu.cas.cz, 10/2014

clear
latd_view_point=-50;  %latitude (deg)
lond_view_point=170;  %longitude (deg)

%% Selection of Earth topographical data
model='ETOPO2_030arcmin';
fprintf('Loading Earth data: %s\n',model);
load (model);

%% Earth topography in 3D as PNG image
[hc,hlab,name_png]=rotating_3d_globe(lond_etopo2,latd_etopo2,elev_etopo2_km,'coastlines',0,...
    'exaggeration_factor',13,'radius',6378,'units','km',...
    'graph_label',sprintf('Earth topography (%s)',model),...
    'clbr_limits',[-10 10],'clbr_tick',-10:2:10,...
    'cptcmap_pm','GMT_globe',...
    'preview_figure_visible',1,...
    'azimuth',90+lond_view_point,'elevation',latd_view_point,...
    'window_height',650);
movefile(name_png,'missing_data_line_01_correct.png');

%% missing line
lond_etopo2=lond_etopo2(1:end-1);
elev_etopo2_km=elev_etopo2_km(:,1:end-1);
[hc,hlab,name_png]=rotating_3d_globe(lond_etopo2,latd_etopo2,elev_etopo2_km,'coastlines',0,...
    'exaggeration_factor',13,'radius',6378,'units','km',...
    'graph_label',sprintf('Earth topography (%s)',model),...
    'clbr_limits',[-10 10],'clbr_tick',-10:2:10,...
    'cptcmap_pm','GMT_globe',...
    'preview_figure_visible',1,...
    'azimuth',90+lond_view_point,'elevation',latd_view_point,...
    'window_height',650);
movefile(name_png,'missing_data_line_01_incorrect.png');

