NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/opnml/FCAST_1.2/graybat.m

Revision 495 (checked in by cbc, 12 years ago)

Initial import of Stark code.

Line 
1 function hpo=graybat(m)
2
3 % hpo=graybat(m)
4 %
5 % Creates a gray scaled 3D bathymetry image using a mesh structure
6 % loaded by MESHSTR
7
8 newplot;
9
10 hp=patch(m.x(m.e)',m.y(m.e)',-m.z(m.e)',m.z(m.e)');
11
12 h=(log(get(hp,'FaceVertexCData')));
13 ch=1-[h h h]/max(h(:));
14
15 set(hp,'CDataMapping','direct',...
16         'FaceVertexCData',ch,...
17         'EdgeColor','interp')
18 [a,e]=view;
19 if a==0&e==90
20         view(45,30)
21 end
22 set(gca,'dataaspectratio',[1 1 1e-3])
23
24 if nargout
25         hpo=hp;
26 end
Note: See TracBrowser for help on using the browser.