1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 99.2beta8 (1.46)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>6.12 Optimal triangulation of data</TITLE>
<META NAME="description" CONTENT="6.12 Optimal triangulation of data">
<META NAME="keywords" CONTENT="GMT_Docs">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v99.2beta8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="GMT_Docs.css">
<LINK REL="next" HREF="node86.html">
<LINK REL="previous" HREF="node84.html">
<LINK REL="up" HREF="node73.html">
<LINK REL="next" HREF="node86.html">
</HEAD>
<BODY bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html2220"
HREF="node86.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html2214"
HREF="node73.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html2208"
HREF="node84.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html2216"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html2218"
HREF="node149.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2221"
HREF="node86.html">6.13 Plotting of vector</A>
<B> Up:</B> <A NAME="tex2html2215"
HREF="node73.html">6. Cook-book</A>
<B> Previous:</B> <A NAME="tex2html2209"
HREF="node84.html">6.11 Making a 3-D</A>
  <B> <A NAME="tex2html2217"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html2219"
HREF="node149.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION0014120000000000000000"></A>
<A NAME="11128"></A>
<BR>
6.12 Optimal triangulation of data
</H1>
<P>
Our next example (Figure <A HREF="node85.html#fig:GMT_example_12">6.12</A>)
operates on a data set of topographic
readings non-uniformly distributed in the plane (Table
5.11 in Davis: <I>Statistics and Data Analysis in Geology</I>,
J. Wiley). We use <A NAME="tex2html410"
HREF="../triangulate.html"><I><B>triangulate</B></I></A><A NAME="11141"></A> to perform the optimal
Delaunay triangulation, then use the output to draw the
resulting network. We label the node numbers as well as
the node values, and call <A NAME="tex2html411"
HREF="../pscontour.html"><I><B>pscontour</B></I></A><A NAME="11150"></A> to make a contour
map and image directly from the raw data. Thus, in this
example we do not actually make gridded files but still
are able to contour and image the data. We use a color
palette table <U>topo.cpt</U> (supplied with the script data
separately). The script becomes:
<P>
<P>
<BR>
<P>
<BR CLEAR="ALL">
<HR>
<BR>
<PRE>
triangulate table_5.11 -M >! net.xy
psxy -R0/6.5/-0.2/6.5 -JX3.06i/3.15i -B2f1WSNe -M net.xy -W0.5p -P -K -Y4.65i >! example_12.ps
psxy table_5.11 -R -JX -O -K -Sc0.12i -G255 -W0.25p >> example_12.ps
$AWK '{print $1, $2, 6, 0, 0, 6, NR-1}' table_5.11 | \
pstext -R -JX -O -K >> example_12.ps
psxy -R -JX -B2f1eSNw -M net.xy -W0.5p -O -K -X3.25i >> example_12.ps
psxy -R -JX -O -K table_5.11 -Sc0.03i -G0 >> example_12.ps
$AWK '{printf "%g %s 6 0 0 5 %g\n", $1, $2, $3}' table_5.11 | pstext -R -JX -O -K -W255o \
-C0.01i/0.01i -D0.08i/0i -N >> example_12.ps
set z = `minmax table_5.11 -C -I25`
makecpt -Cjet -T$z[5]/$z[6]/25 >! topo.cpt
pscontour -R -JX table_5.11 -B2f1WSne -W0.75p -Ctopo.cpt -L0.25pta -G1i -X-3.25i -Y-3.65i -O -K \
-U"Example 12 in Cookbook" >> example_12.ps
pscontour -R -JX table_5.11 -B2f1eSnw -Ctopo.cpt -I -X3.25i -O -K >> example_12.ps
echo "3.16 8 30 0 1 2 Delaunay Triangulation" | pstext -R0/8/0/11 -Jx1i -O -X-3.25i >> example_12.ps
\rm net.xy topo.cpt .gmtcommands
</PRE>
<P>
<BR>
<BR>
<P>
<BR CLEAR="ALL">
<HR>
<P></P>
<DIV ALIGN="CENTER"><A NAME="fig:GMT_example_12"></A><A NAME="11208"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 6.12:</STRONG>
Optimal triangulation of data</CAPTION>
<TR><TD><IMG
WIDTH="386" HEIGHT="494" BORDER="0"
SRC="img113.gif"
ALT="\begin{figure}\centering\epsfig{figure=eps/GMT_example_12.eps}\end{figure}"></TD></TR>
</TABLE>
</DIV><P></P>
<P>
<A NAME="11198"></A>
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html2220"
HREF="node86.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A>
<A NAME="tex2html2214"
HREF="node73.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A>
<A NAME="tex2html2208"
HREF="node84.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A>
<A NAME="tex2html2216"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.gif"></A>
<A NAME="tex2html2218"
HREF="node149.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.gif"></A>
<BR>
<B> Next:</B> <A NAME="tex2html2221"
HREF="node86.html">6.13 Plotting of vector</A>
<B> Up:</B> <A NAME="tex2html2215"
HREF="node73.html">6. Cook-book</A>
<B> Previous:</B> <A NAME="tex2html2209"
HREF="node84.html">6.11 Making a 3-D</A>
  <B> <A NAME="tex2html2217"
HREF="node1.html">Contents</A></B>
  <B> <A NAME="tex2html2219"
HREF="node149.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2001-04-18
</ADDRESS>
</BODY>
</HTML>
|