pyvista.ParametricRandomHills#
- ParametricRandomHills(
- number_of_hills: int | None = None,
- hill_x_variance: float | None = None,
- hill_y_variance: float | None = None,
- hill_amplitude: float | None = None,
- random_seed: int | None = None,
- x_variance_scale_factor: float | None = None,
- y_variance_scale_factor: float | None = None,
- amplitude_scale_factor: float | None = None,
- **kwargs,
Generate a surface covered with randomly placed hills.
ParametricRandomHills generates a surface covered with randomly placed hills. Hills will vary in shape and height since the presence of nearby hills will contribute to the shape and height of a given hill. An option is provided for placing hills on a regular grid on the surface. In this case the hills will all have the same shape and height.
- Parameters:
- number_of_hills
int
, default: 30 The number of hills.
- hill_x_variance
float
, default: 2.5 The hill variance in the x-direction.
- hill_y_variance
float
, default: 2.5 The hill variance in the y-direction.
- hill_amplitude
float
, default: 2 The hill amplitude (height).
- random_seed
int
, default: 1 The Seed for the random number generator, a value of 1 will initialize the random number generator, a negative value will initialize it with the system time.
- x_variance_scale_factor
float
, default: 13 The scaling factor for the variance in the x-direction.
- y_variance_scale_factor
float
, default: 13 The scaling factor for the variance in the y-direction.
- amplitude_scale_factor
float
, default: 13 The scaling factor for the amplitude.
- **kwargs
dict
,optional
See
surface_from_para()
for additional keyword arguments.
- number_of_hills
- Returns:
pyvista.PolyData
ParametricRandomHills surface.
Examples
Create a ParametricRandomHills mesh.
>>> import pyvista as pv >>> mesh = pv.ParametricRandomHills() >>> mesh.plot(color='w', smooth_shading=True)