Terrain
Plot
plot the terrain
Calling Sequence
Parameters
Options
Description
Examples
Plot(T, opts)
T:-Plot(opts)
T
-
Terrain; the Terrain object
opts
(optional) equation(s) of the form option = value; specify options for the Plot command
res_grid = [posint, posint]
Specifies the number of grid points for plotting the checkered terrain. This option changes the resolution of the plot. The res_grid and res_size options are mutually exclusive.
res_size = [positive, positive]
Specifies the size of the grid for plotting the checkered terrain. This option changes the resolution of the plot. The res_grid and res_size options are mutually exclusive.
color = string or list(numeric)
Defines the terrain plot color. The default is Gray.
The Plot method creates a 3-D plot of the terrain.
with⁡Tires:
Define the terrain equation.
eq≔0.1⁢tanh⁡x−5−tanh⁡x−30:
Generate a Terrain object using the defined equation. Select the z-axis as the up direction. The order of the two independent variables is [x,y]. Assign the range for x to be -10 to 100, and for y to be -10 to 10. Also, assign 50 grid points for the x-axis and 10 for the y-axis. Finally, set the title to myTerrain.
terrain≔GenerateTerrain⁡eq,−10..100,−10..10,50,10,up_direction=z,title=myTerrain:
Plot the generated terrain.
terrain:-Plot⁡res_size=1,1,color=100,100,100
See Also
Tires
Download Help Document