AddNoise - MapleSim Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Terrain

  

AddNoise

  

add noise to the terrain data points

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

AddNoise(T, amp, opts)

T:-AddNoise(amp, opts)

Parameters

T

-

Terrain; the Terrain object

amp

-

numeric; the amplitude (peak value) of the noise, in meters

opts

-

(optional) equation(s) of the form option = value; specify options for the AddNoise command

Options

grid = [posint, posint]

Specifies the number of grid points for the noise. The grid and size options are mutually exclusive.

size = [posint, posint]

Specifies the size of the grid, in meters, for adding noise. The grid and size options are mutually exclusive.

Description

The AddNoise method adds random values to the grid data points. It can be used to make the terrain surface uneven and bumpy. The absolute value of the added random value will be less than the amp parameter. Specified values for size or grid will change the wavelength of the added noise.

Examples

withTires:

Define the terrain equation.

eq0.1tanhx5tanhx30:

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.

terrainGenerateTerraineq,10..100,10..10,50,10,up_direction=z,title=myTerrain:

Plot the generated terrain.

terrain:-Plot

Add some unevenness to the terrain.

terrain:-AddNoise0.1,size=2,2:

Plot the new terrain data points.

terrain:-Plot

See Also

DeleteNoise

Terrain

Tires