image thumbnail
from Global tsunami simulation GUI by Maxim Vedenyov
It is wave equation on sphere surface. Land influence neglected. There are colormap and lands veiw.

set_clb
function set_clb 
global v u uo hx hy hz hhp hgf ha

p1=str2num(get(hx,'string'));
p2=str2num(get(hy,'string'));
p3=str2num(get(hz,'string'));

h=str2num(get(hhp,'string'));

p=[p1  p2 p3]; % center of peak
p=p/sqrt(p*p');
dp=v*p'; % dot products
al=acos(dp);
gs=0.1; % gasusian size, rad
u=(h/hgf)*exp(-(al/gs).^2);

caxis(ha,h*[-0.2 0.2]);

uo=u;

Contact us