MCPcopy Create free account
hub / github.com/Astropulse/hexmap / noise_field

Function noise_field

map.py:373–375  ·  view source on GitHub ↗
(cfg: Config, seed_off: int, scale: int, octaves: int, smooth: int = 0)

Source from the content-addressed store, hash-verified

371
372
373def noise_field(cfg: Config, seed_off: int, scale: int, octaves: int, smooth: int = 0) -> np.ndarray:
374 a = normalize01(fbm((cfg.rows, cfg.cols), cfg.seed + seed_off, scale, octaves, cfg.persistence, cfg.lacunarity))
375 return smooth_box(a, smooth)
376
377
378def warp_int(a: np.ndarray, wx: np.ndarray, wy: np.ndarray) -> np.ndarray:

Callers 5

water_breakFunction · 0.85
build_fieldsFunction · 0.85
add_lakesFunction · 0.85
add_dunes_in_sand_bodiesFunction · 0.85
build_tilemapFunction · 0.85

Calls 3

normalize01Function · 0.85
fbmFunction · 0.85
smooth_boxFunction · 0.85

Tested by

no test coverage detected