Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r.surf.volcano: port from grass6 addons shell script #1202

Open
wants to merge 6 commits into
base: grass8
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/raster/r.surf.volcano/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MODULE_TOPDIR = ../..

PGM = r.surf.volcano

include $(MODULE_TOPDIR)/include/Make/Script.make

default: script
97 changes: 97 additions & 0 deletions src/raster/r.surf.volcano/r.surf.volcano.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<h2>DESCRIPTION</h2>


<em>r.surf.volcano</em> creates an artificial surface resembling a seamount
or cone volcano. The user can alter the size and shape of the mountain and
optionally roughen its surface.


<h2>NOTES</h2>

The friction of distance controls the shape of the mountain when using
the default polynomial method. Higher values generate steeper slopes.
<p>
The <i>pseudo</i>-<b>kurtosis</b> factor is used with all other methods
to control the slope steepness. For the Gaussian method setting the value
nearer to zero creates a flatter surface, while higher values generate
steeper slopes. For Lorentzian, logarithmic, and exponential methods the
opposite is true.
<p>
The surface roughness factor controls the fixed standard deviation
distance (<b>sigma</b>) used in the Gaussian random number generator.
It is only used when the <b>-r</b> roughen surface flag is turned on.
A value closer to zero makes a smoother surface, a higher value makes
a rougher surface.
<p>
It is possible to set a negative value for the <b>peak</b> in order
to create a pit.


<h2>EXAMPLES</h2>

Create a simple Gaussian bell:
<div class="code"><pre>
r.surf.volcano -r output=seamount method=gaussian

# view in the display monitor
r.colors seamount color=roygbiv
d.rast seamount

# render in 3D
m.nviz.image elevation_map=seamount out=gaussian \
perspective=10 resolution_fine=1 height=3500
pnmtopng gaussian.ppm > gaussian.png

# export to Matlab
r.out.mat in=seamount out=seamount.mat

# integrate into existing DEM
r.mapcalc "seamount_dem = if(seamount > dem, seamount, dem)"
r.colors seamount_dem color=srtm
</pre></div>

<div align="center" style="margin: 10px">
<img src="r_surf_volcano_gaussian.jpg" border=0><br>
<i>Gaussian bell</i>
</div>


Create a roughened volcano with a crater:
<div class="code"><pre>
r.surf.volcano -r output=volcano crater=250 --verbose
r.relief in=volcano out=volcano.shade
</pre></div>

Create a fancy 3D scene:
<div class="code"><pre>
r.surf.volcano -r output=base_volcano peak=1000 crater=200
r.surf.fractal output=base_fractal
r.mapcalc "artificial_land = base_volcano*3.5 + base_fractal"

m.nviz.image elevation_map=artificial_land out=volcano3D \
perspective=25 resolution_fine=1 height=30000
pnmtopng volcano3D.ppm > volcano3D.png
</pre></div>


<div align="center" style="margin: 10px">
<img src="r_surf_volcano_volcano3D.jpg" border=0><br>
<i>Synthetic volcano from r.surf.volcano combined with fractal
landscape from r.surf.fractal</i>
</div>


<h2>SEE ALSO</h2>

<em>
<a href="https://grass.osgeo.org/grass-stable/manuals/r.surf.fractal.html">r.surf.fractal</a><br>
<a href="https://grass.osgeo.org/grass-stable/manuals/r.surf.gauss.html">r.surf.gauss</a><br>
<a href="https://grass.osgeo.org/grass-stable/manuals/r.surf.random.html">r.surf.random</a>
</em>

<h2>AUTHOR</h2>

Hamish Bowman<br>
<i>Dept. of Geology<br>
University of Otago<br>
Dunedin, New Zealand</i>
Loading