Changeset 19304


Ignore:
Timestamp:
04/23/15 11:05:18 (10 years ago)
Author:
Eric.Larour
Message:

CHG: more generic plot_gl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-jpl-ad2/src/m/plot/plot_gl.m

    r18356 r19304  
    5252%zoom
    5353replacestringinfile('./generic/editables.js','initialZoomFactor = -.20;',['initialZoomFactor = ' num2str(getfieldvalue(options,'zoom',-.25)) ';']);
     54       
    5455
     56%initialize model:
     57model.title=title;
     58model.initialZoomFactor=getfieldvalue(options,'zoom',-.25);
     59
     60%Deal with contour {{{
     61
     62contour_lat=md.mesh.lat(md.mesh.segments(:,1));
     63contour_long=md.mesh.long(md.mesh.segments(:,1));
     64contour_surface=md.geometry.surface(md.mesh.segments(:,1));
     65
     66R=6371000*ones(length(contour_surface),1)+scaling_factor*contour_surface;
     67
     68contourx = R .* cosd(contour_lat) .* cosd(contour_long);
     69contoury = R .* cosd(contour_lat) .* sind(contour_long);
     70contourz = R .* sind(contour_lat);
     71
     72model.contourx=contourx;
     73model.contoury=contoury;
     74model.contourz=contourz;
     75
     76%}}}
    5577%Deal with mesh and results {{{
    5678       
     
    6890        z = R .* sind(lat);
    6991
    70         %initialize model:
    71         model.title='Brunt Ice Shelf';
    7292
    7393        %Deal with triangulation:
     
    110130       
    111131        %Write model to javascript database file:
    112         writejsfile([database 'brunt.js'],model,'brunt')
     132        writejsfile([database directory '.js'],model,directory);
    113133%}}}
    114134
Note: See TracChangeset for help on using the changeset viewer.