150 likes | 404 Views
計算機在應用地球科學上的應用 3D 透視法繪圖. 研究生:黃雯苓 老師 :王天楷 博士 日期 :2005.08.02. 大綱. 一、目的與用意 二、批次檔 三、特殊指令說明. 一、目的與用意 繪製地形圖及等高線圖. 二、批次檔 (2-1). #! /bin/csh ###### File:ray:/d23/guykiko/GMT3.4ex/GMT3.4examples/ex04/job4c.gmt ###### Author: Ming-Kai Chen, 9 Oct 2002 ###### GMT EXAMPLE 4c
E N D
計算機在應用地球科學上的應用3D透視法繪圖 研究生:黃雯苓 老師 :王天楷 博士 日期:2005.08.02
大綱 一、目的與用意 二、批次檔 三、特殊指令說明
二、批次檔(2-1) #! /bin/csh ###### File:ray:/d23/guykiko/GMT3.4ex/GMT3.4examples/ex04/job4c.gmt ###### Author: Ming-Kai Chen, 9 Oct 2002 ###### GMT EXAMPLE 4c ###### $Id: job4c.csh,v 1.1.1.1 2000/12/28 01:23:45 gmt Exp $ ###### Purpose: 3-D perspective color plot of Hawaiian topography and geoid ###### GMT progs: grdcontour, grdview, pscoast, pstext, psxyz set ingrd1 = HI_geoid4.grd set ingrd2 = HI_topo4.grd set outgrd1 = g_intens.grd set outgrd2 = t_intens.grd set outps1 = example_4c.ps set incpt1 = geoid.cpt set incpt2 = topo.cpt set proj1 = M6.75i set proj2 = Z3.4i set proj3 = x1i set range1 = 195/210/18/25 set frame1 = 2/2NEsw set frame2 = 2/2/2 set viewpoint1 = 60/30
二、批次檔(2-2) grdgradient $ingrd1 -A0 -G$outgrd1 -Nt0.75 -M grdgradient $ingrd2 -A0 -G$outgrd2 -Nt0.75 -M grdview $ingrd1 -I$outgrd1 -R$range1 -J$proj1 -E$viewpoint1 -C$incpt1 -Qi100 \ -U/-1.25i/-1i/"Example 4c in Cookbook" -P -X1.5i -Y1.25i -K -V > $outps1 pscoast -R -JM -B$frame1 -E$viewpoint1 -G0 -O -K -V >> $outps1 echo '205 26 0 0 1.1' | \ psxyz -R -JM -E$viewpoint1 -SV0.2i/0.5i/0.4i -W1p -G0/0/0 -N -O -K -V >> $outps1 echo '205 29.2 36 -90 1 5 N' | \ pstext -R -JM -E$viewpoint1 -N -O -K -V >> $outps1 grdview $ingrd2 -I$outgrd2 -JM -J$proj2 -C$incpt2 -E$viewpoint1 \ -R$range1'/-6/4' -N-6/0/255/0 -Qi100 -Y2.2i -O -K -V >> $outps1 psbasemap -R -JM -B$frame2':Topo (km):neZ' -J$proj2 -E$viewpoint1 -Z-6 -O -K \ -V>> $outps1 echo '3.25 5.75 60 0.0 33 2 H@#awaiian@# R@#idge' | \ pstext -R0/10/0/10 -Jx1i -O -V >> $outps1 ############################################################################################################ \rm -f *_intens.grd .gmtcommands #imagetool $outps1 & gv $outps1 &
X/Y/Z軸 間距刻度 frame2 = 2/2/2 frame2 = 1/3/4 三、特殊指令說明 psbasemap 範例 -R -JM -B$frame2':Topo (km):NEZ' -J$proj2 \ - E$viewpoint1 -Z-6 -O -K -V>> $outps1 set frame2 = 2/2/2
frame2 = 2/2/2 frame2 = 1/3/4
-R$range1'/-10/8' -R$range1'/-6/4' 水平角度/垂直角度 制定Z軸範圍 min:-6 ,max:4 側向投影 側向投影 水平角度/垂直角度 set proj2 = Z5i set proj2 = Z3.4i viewpoint1 = 60/60 viewpoint1 = 60/30 viewpoint1 = 30/30 viewpoint1 = 60/30 三、特殊指令說明 • grdview 製作3D立體圖 範例: grdview $ingrd2 -I$outgrd2 -JM -J$proj2 -C$incpt2 -E$viewpoint1 \ -R$range1'/-6/4' -N-6/0/255/0 -Qi100 -Y2.2i -O -K -V >> $outps1 set proj2 = Z3.4i set viewpoint1 = 60/30
說明grdview • NAME grdview - Create 3-D perspective grayshaded/colored image or mesh from a 2-D grd file -Jz Sets the vertical scaling (for 3-D maps). Same syntax as - Jx. -E Sets the viewpoints azimuth and elevation [180/90].
箭號型式 三、特殊指令說明 • psxyz 製標誌 範例: psxyz -R -JM -E$viewpoint1 -SV0.2i/0.5i/0.4i -W1p \ -N -O -K -V >> $outps1
說明psxyz psxyz reads (x,y,z) triplets from files [or standard input] and generates PostScript code that will plot lines, polygons, or symbols at those locations in 3-D. -S Plot symbols. size is symbol size in the unit set in .gmtdefaults (unless c, i,m, or p is appended). The uppercase symbols A, C, D, H, I, S, T are normalized to have the same area as a circle of given size, while the corresponding lowercase symbols are circumscribed by the circle.
附加說明grdcontour 繪製等高線圖
每上升2m產生 一個等高線標高 每上升1m 產生一條等高線 每上升1m 產生一條等高線 每上升3m 產生一條等高線 -G4i 每上升4m 標注一條等高線標高 -G1i 每上升2m 標注一條等高線標高 同一等高線上 標高的間距 三、特殊指令說明 • grdcontour 繪製等高線圖 範例: grdcontour $ingrd1 -R$range1 -J$proj1 -E$viewpoint1 -C1 -A2 -G4i –P \ -X1.5i -Y1.5i –U/-1.25i/-1.25i/"Example 4 in Cookbook" -K -V > $outps1
-A anot_int is annotation interval in data units. Ignored if contour levels are given in a file. [Default is no annotations]. Several options can be set to modify the form of the annotation.Give - to disable all anotations. Append ffont_size to chang font size [9]. -G gap is distance between each annotation along the same contour. width is number of points over which to estimate the best fitting slope for contour labels [Default is 10c/10 or 4i/10]. -C The contours to be drawn may be specified in one of three possible ways: If cont_int has the suffix ".cpt" and can be opened as a file,it is assumed to be a color palette table. 說明grdcontour
報告完畢 謝謝!