GLG410 Van Maitre topo script
% script to read in Van Maitre topo data, make a surface and animate it vm.m
% echo all commands to the screen
echo on
% load the data vectors and get ready to grid
load e;
load n;
load h;
estep = (max(e)-min(e))/50;
nstep = (max(n)-min(n))/50;
ee = [min(e):estep:max(e)];
nn = [min(n):nstep:max(n)];
% grid
[xi,yi,zi]=griddata(e,n,h,ee,nn');
%show the plot
surfl(xi,yi,zi);
title('Van Maitre topo data');
xlabel('distance east, m');
ylabel('distance north, m');
zlabel('elevation,m');
shading interp;
colormap pink;
% prepare a special movie vector that will hold 15 frames
m = moviein(15);
% use a for loop to increment the view position to slowly rotate the image
for i=1:15;
view(0+24*i,30)
m(:,i) = getframe;
end
%show the movie 3 times
movie(m,3)
echo off
Pages maintained by
Prof. Ramón Arrowsmith
Last modified November 23, 1999