ssqpy.model.terrain
terrain ¶
Submodule containing the Terrain class, used to define the 3D terrain
that the system model acts in. By default, this is the predefined
FlatTerrain class.
SlopeTerrain ¶
Bases: Terrain
Slope terrain
Height is \(h = h_0 + s_x x + s_y y\), where \(s_x\) and \(s_y\) are the slopes
along the x and y axes (rise over run)
StepTerrain ¶
Bases: Terrain
Piecewise flat terrain with a flight of steps along the x axis
Height is base_height for \(x < x_{start}\), then rises by step_height at
x_start and every step_length after that, for num_steps steps in total
The terrain stays at the top step height afterwards; with the default of a
single step, step_length has no effect
HeightmapTerrain ¶
Bases: Terrain
Smooth terrain interpolated from a uniform grid of heights
heights(i, j) is the height at \((x_0 + i r, y_0 + j r)\), where \(r\) is the
grid resolution
Heights are interpolated with a bicubic Catmull-Rom spline, which passes
through every grid height and has continuous height and slope
The height second derivatives are piecewise continuous
Outside the grid, the terrain extends flat from its closest edge value