SkyMapGenerator
Trait for generating sky/weather maps with different weather patterns. Uses Gaussian distribution bands to create realistic weather patterns that vary based on distance from a weather center and intensity parameter.
Attributes
- Graph
-
- Supertypes
- Known subtypes
-
object MapGenerator
Members list
Value members
Concrete methods
Generates a sky grid with varied cell types. The distribution of cell types is based on distance from a random center point. Weather types are distributed in concentric bands around a random center:
Generates a sky grid with varied cell types. The distribution of cell types is based on distance from a random center point. Weather types are distributed in concentric bands around a random center:
- Center: Heavy rain (expands with higher intensity)
- Middle: Light rain (contracts with higher intensity)
- Outer: Heavy clouds
- Perimeter: Clear sky
- Default: Intense sun
Value parameters
- size
-
the size of the grid (width and height)
- weatherIntensity
-
the intensity of weather patterns (0.0 to 1.0)
Attributes
- Returns
-
a grid with distributed weather patterns
- Throws
-
IllegalArgumentException
if size is not positive or weatherIntensity is out of bounds
Inherited methods
Calculates Gaussian weight for distance-based probability calculations.
Calculates Gaussian weight for distance-based probability calculations.
Value parameters
- distance
-
the distance from center
- mean
-
the mean of the Gaussian distribution
- stdDev
-
the standard deviation of the Gaussian distribution
Attributes
- Returns
-
the Gaussian weight value
- Inherited from:
- BaseMapGenerator
Common grid generation method that builds a grid based on a selection function generalizing the element type for any possible grid generation.
Common grid generation method that builds a grid based on a selection function generalizing the element type for any possible grid generation.
Type parameters
- T
-
the type of elements in the grid
Value parameters
- selector
-
a function that selects an element based on normalized distance and random value
- size
-
the size of the grid (width and height)
Attributes
- Returns
-
a map of coordinates to elements
- Inherited from:
- BaseMapGenerator
Inherited fields
Attributes
- Inherited from:
- BaseMapGenerator