~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to display/d.nviz/description.html

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<h2>DESCRIPTION</h2>
2
 
 
3
 
The <em>d.nviz</em> program allows the user to easily create a script
4
 
that can be run in NVIZ to fly through a terrain.
5
 
 
6
 
The NVIZ flight path can be chosen interactively from the GRASS
7
 
monitor (<em>-i</em>) or supplied on the command line as comma
8
 
separated coordinates. The program optionally allows a KeyFrame
9
 
file to created (after running the script). This KeyFrame file can
10
 
be loaded into the <em>Keyframe Animation</em> panel for fine
11
 
tuning or editing.
12
 
 
13
 
<p>
14
 
The script generated by <em>d.nviz</em> can be run from the NVIZ
15
 
command line (nviz script=script_name) or after NVIZ is started by
16
 
selecting <em>Scripting->Play Script</em>.
17
 
 
18
 
<h2>OPTIONS</h2>
19
 
 
20
 
<h3>Flags:</h3>
21
 
<dl>
22
 
<dt><b>-i</b>
23
 
<dd>Intercative mode
24
 
<dd>The user selects the camera path from the GRASS monitor by
25
 
        clicking the left mouse button along the route. Click the
26
 
        right mouse button to finish.
27
 
<dt><b>-f</b>
28
 
<dd>Full render
29
 
<dd>The script will draw all loaded NVIZ data and save scene to PPM image.
30
 
<dt><b>-c</b>
31
 
<dd>Flay at constant elevation
32
 
<dd>With this flag the camera will be set to an elevation given by the
33
 
        <em>ht=</em> parameter. The default is to fly at <em>ht=</em>
34
 
        above the topography (i.e. camera height = elevation + ht)
35
 
<dt><b>-k</b>
36
 
<dd>Output KeyFrame file
37
 
<dd>Generate a KeyFrame file that can be loaded from the NVIZ
38
 
        <em>Keyframe Animation</em> panel. The KeyFrame file is
39
 
        automatically assigned the script name with a
40
 
        <em>.kanimator</em> extension.
41
 
<dt><b>-o</b>
42
 
<dd>Render the animation in an off-screen context
43
 
<dt><b>-e</b>
44
 
<dd>Enable vector and sites drawing
45
 
</dl>
46
 
 
47
 
 
48
 
<h3>Parameters:</h3>
49
 
<dl>
50
 
<dt><b>input</b>
51
 
<dd>The name of the GRASS raster map with elevation data. 
52
 
<dd>This should be the same file that will be loaded in NVIZ.
53
 
 
54
 
<dt><b>output</b>
55
 
<dd>The name of the NVIZ script to create.
56
 
 
57
 
<dt><b>name</b>
58
 
<dd>The prefix for output images if running in full render mode (<em>-f</em>).
59
 
<dd>The defulat preifix is NVIZ (eg. NVIZ0000.ppm).
60
 
 
61
 
<dt><b>dist</b>
62
 
<dd>The distance of the camera behind the center of view.
63
 
 
64
 
<dt><b>ht</b>
65
 
<dd>The height of the camera above the center of view.
66
 
<dd>If the the <em>-c</em> flag is set, the height represents the actual camera height.
67
 
 
68
 
<dt><b>frames</b>
69
 
<dd>The number of frames in the animation.
70
 
 
71
 
<dt><b>start</b>
72
 
<dd>The starting frame number (default = 0).
73
 
<dd> This option may be useful in full render mode when creating an
74
 
animation in sections. For example the user may wish to start at frame
75
 
number 2000.
76
 
 
77
 
<dt><b>route</b>
78
 
<dd>The comma separated geographic coordinates for keyframe locations.
79
 
<dd>The interactive flag (<em>-i</em>) overrides this option.
80
 
 
81
 
</dl>
82
 
 
83
 
<h2>EXAMPLE</h2>
84
 
To interactively create an NVIZ animation from raster elev.rast with
85
 
500 frames and the camera set to 50 meters above and 250 meters behind
86
 
the scene, run the following:
87
 
 
88
 
<div class="code"><pre>
89
 
g.region rast=elevation.dem
90
 
d.rast elevation.dem
91
 
d.nviz -ik input=elevation.dem output=nviz.script dist=2400 ht=1220 frames=1000
92
 
</pre></div>
93
 
In the above the example the user is prompted to select the route from the GRASS monitor.
94
 
The output script, 'nviz.script.nvscr', can then be run in NVIZ:
95
 
<div class="code"><pre>
96
 
nviz elevation=elevation.dem script=nviz.script.nvscr
97
 
</pre></div>
98
 
 
99
 
<h2>NOTES / HINTS</h2>
100
 
The user must select at least four key-frame locations (points)
101
 
 otherwise an error is generated.
102
 
<p>
103
 
If the GRASS region is changed the <em>d.nviz</em> command must be re-run.
104
 
<p>
105
 
The current GRASS region and the user supplied parameters are included
106
 
as a comment at the top of the output script. This information can be
107
 
used to easily re-create the animation.
108
 
<p>
109
 
The camera position is calculated backwards from the supplied
110
 
position(s). It is possible that the camera position will lie outside
111
 
the current window, in which case a non-fatal error is generated
112
 
(Error: selected point is outside region).  This error can result in
113
 
jerky movements during the animation.  To correct this problem reduce
114
 
the <em>dist=</em> parameter or increase the current region.
115
 
 
116
 
<h3>Loading the script into NVIZ</h3>
117
 
 
118
 
The user can run the script at arbitrary resolution. To re-run it at
119
 
higher spatial resolution or different settings, the user first loads
120
 
the surface and sets the resolution, lighting, etc. Then internally
121
 
the script generated by <em>d.nviz</em> is run. Alternatively, the
122
 
user can run nviz with a previuosly saved state and the
123
 
<em>d.nviz</em> generated script:
124
 
 
125
 
<div class="code"><pre>
126
 
nviz state=saved.state script=nviz.script.nvscr
127
 
</pre></div>
128
 
 
129
 
<h3>Keyframe animator script</h3>
130
 
Running the script generated by d.nviz within NVIZ, a new script for
131
 
kanimator (keyframe animator) is created. The kanimator panel offers
132
 
fine tuning of the speed (frame rate) as well as editing individual
133
 
frames or inserting new frames. This new kanimator script has to be
134
 
loaded from the Kanimator panel in NVIZ. In the Kanimator panel there
135
 
are Save and Load button which allow the user to save and re-load a
136
 
kanimator script. Once loaded, the key frames will appear in the GUI
137
 
and can then be edited there.
138
 
 
139
 
<h2>SEE ALSO</h2>
140
 
 
141
 
<em><a href="nviz.html">nviz</a></em>
142
 
 
143
 
<h2>AUTHOR</h2>
144
 
 
145
 
<a href="mailto:bcovill@tekmap.ns.ca">Bob Covill</a>
146
 
<p><i>Last changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $</i>