48 glm::vec2 center = {0.5f, 0.5f},
49 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
56 glm::vec2 center = {0.5f, 0.5f},
57 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
95Array
crater(glm::ivec2 shape,
97 glm::vec2 center = {0.5f, 0.5f},
99 float inner_depth = 0.1f,
100 float inner_exp = 3.f,
101 float lip_height = 0.02f,
102 float lip_extent = 0.25f,
104 float asym_ratio = 0.8f,
105 float central_peak_height = 0.01f,
106 float central_peak_extent = 0.4f,
108 float terrace_extent = 0.1f,
109 float terrace_exp = 2.f,
110 float terrace_persistence = 0.5f,
111 const Array *p_noise_r =
nullptr,
112 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f},
113 Array *p_crater_mask =
nullptr,
114 Array *p_inner_crater_mask =
nullptr);
147 float displacement = 0.2f,
152 float persistence = 0.5f,
153 float lacunarity = 2.f,
154 const glm::vec2 ¢er = {0.5f, 0.5f},
155 const glm::vec4 &bbox = {0.f, 1.f, 0.f, 1.f});
195Array
rift(glm::ivec2 shape,
198 float axial_slope = 0.2f,
200 bool scale_with_depth =
true,
202 float profile_param = 0.f,
203 float bottom_extent = 0.1,
204 float bottom_depth = 0.05f,
206 float bottom_profile_param = 0.f,
207 bool bottom_force_minimum_depth =
true,
208 float outer_slope = 0.5f,
209 const Array *p_noise_r =
nullptr,
210 const Array *p_noise_offset =
nullptr,
211 glm::vec2 center = {0.5f, 0.5f},
212 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f},
213 Array *p_rift_mask =
nullptr,
214 Array *p_bottom_mask =
nullptr);
260 float k_smoothing = 0.1f,
261 float base_noise_amp = 0.2f,
262 const Array *p_noise_x =
nullptr,
263 const Array *p_noise_y =
nullptr,
264 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
346 float large_scale_warp_amp = 0.2f,
347 float large_scale_gain = 6.f,
348 float large_scale_amp = 0.2f,
349 float medium_scale_kw_ratio = 3.f,
350 float medium_scale_warp_amp = 1.f,
351 float medium_scale_gain = 7.f,
352 float medium_scale_amp = 0.08f,
353 float small_scale_kw_ratio = 10.f,
354 float small_scale_amp = 0.1f,
355 float small_scale_overlay_amp = 0.002f,
356 float rugosity_kw_ratio = 1.f,
357 float rugosity_amp = 1.f,
358 bool flatten_activate =
true,
359 float flatten_kw_ratio = 1.f,
360 float flatten_amp = 0.f,
361 const Array *p_noise_x =
nullptr,
362 const Array *p_noise_y =
nullptr,
363 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
403Array
island(
const Array &land_mask,
404 const Array *p_noise_r =
nullptr,
405 float apex_elevation = 1.f,
406 bool filter_distance =
true,
408 float slope_min = 0.1f,
409 float slope_max = 8.f,
410 float slope_start = 0.5f,
411 float slope_end = 1.f,
412 float slope_noise_intensity = 0.5f,
413 float k_smooth = 0.05f,
414 float radial_noise_intensity = 0.3f,
415 float radial_profile_gain = 2.f,
416 float water_decay = 0.05f,
417 float water_depth = 0.3f,
418 float lee_angle = 30.f,
420 float uplift_amp = 0.f,
421 Array *p_water_depth =
nullptr,
422 Array *p_inland_mask =
nullptr);
467Array
island(
const Array &land_mask,
469 float noise_amp = 0.07f,
470 glm::vec2 noise_kw = {4.f, 4.f},
471 int noise_octaves = 8,
472 float noise_rugosity = 0.7f,
473 float noise_angle = 45.f,
474 float noise_k_smoothing = 0.05f,
475 float apex_elevation = 1.f,
476 bool filter_distance =
true,
478 float slope_min = 0.1f,
479 float slope_max = 8.f,
480 float slope_start = 0.5f,
481 float slope_end = 1.f,
482 float slope_noise_intensity = 0.5f,
483 float k_smooth = 0.05f,
484 float radial_noise_intensity = 0.3f,
485 float radial_profile_gain = 2.f,
486 float water_decay = 0.05f,
487 float water_depth = 0.3f,
488 float lee_angle = 30.f,
490 float uplift_amp = 0.f,
491 Array *p_water_depth =
nullptr,
492 Array *p_inland_mask =
nullptr);
548 float k_smoothing = 0.f,
550 float cone_alpha = 1.f,
551 float ridge_amp = 0.4f,
552 float base_noise_amp = 0.05f,
553 glm::vec2 center = {0.5f, 0.5f},
554 const Array *p_noise_x =
nullptr,
555 const Array *p_noise_y =
nullptr,
556 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
610 bool round_shape =
false,
611 bool add_deposition =
true,
612 float bulk_amp = 0.2f,
613 float base_noise_amp = 0.2f,
614 float k_smoothing = 0.1f,
615 glm::vec2 center = {0.5f, 0.5f},
616 const Array *p_noise_x =
nullptr,
617 const Array *p_noise_y =
nullptr,
618 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
672 float half_width = 0.2f,
673 float angle_spread_ratio = 0.5f,
674 float core_size_ratio = 1.f,
675 glm::vec2 center = {0.5f, 0.5f},
678 float persistence = 0.5f,
679 float lacunarity = 2.f,
680 const Array *p_ctrl_param =
nullptr,
681 const Array *p_noise_x =
nullptr,
682 const Array *p_noise_y =
nullptr,
683 const Array *p_angle =
nullptr,
684 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
738 float k_smoothing = 0.f,
740 bool add_deposition =
true,
741 float ridge_amp = 0.75f,
742 float base_noise_amp = 0.1f,
743 glm::vec2 center = {0.5f, 0.5f},
744 const Array *p_noise_x =
nullptr,
745 const Array *p_noise_y =
nullptr,
746 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
797 float peak_kw = 20.f,
800 float angle_spread_ratio = 0.25f,
802 bool add_deposition =
true,
803 float bulk_amp = 1.f,
804 float base_noise_amp = 0.1f,
805 glm::vec2 center = {0.5f, 0.5f},
806 const Array *p_noise_x =
nullptr,
807 const Array *p_noise_y =
nullptr,
808 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
836Array
plates(glm::ivec2 shape,
841 float mix_ratio = 0.9f,
842 float base_noise_amp = 0.05f,
843 float kw_multiplier = 2.f,
846 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
900 bool add_deposition =
true,
901 float bulk_amp = 0.3f,
902 float base_noise_amp = 0.1f,
903 float k_smoothing = 0.f,
904 glm::vec2 center = {0.5f, 0.5f},
905 const Array *p_noise_x =
nullptr,
906 const Array *p_noise_y =
nullptr,
907 glm::vec4 bbox = {0.f, 1.f, 0.f, 1.f});
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Defines modular function objects for procedural generation, including noise algorithms (Perlin,...
Definition blending.hpp:186
Array mountain_stump(glm::ivec2 shape, std::uint32_t seed, float scale=1.f, int octaves=8, float peak_kw=6.f, float rugosity=0.f, float angle=45.f, float k_smoothing=0.f, float gamma=0.25f, bool add_deposition=true, float ridge_amp=0.75f, float base_noise_amp=0.1f, glm::vec2 center={0.5f, 0.5f}, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Generates a mountain-like heightmap with a flattened (stump-shaped) peak.
Definition mountain_stump.cpp:18
Array plates(glm::ivec2 shape, glm::vec2 kw, std::uint32_t seed, float talus, int direction=0, float mix_ratio=0.9f, float base_noise_amp=0.05f, float kw_multiplier=2.f, int octaves=8, float rugosity=0.f, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Generate a tectonic plate–like heightfield using Voronoi FBM and directional talus projection.
Definition plates.cpp:16
Array badlands(glm::ivec2 shape, glm::vec2 kw, std::uint32_t seed, int octaves=8, float rugosity=0.2f, float angle=30.f, float k_smoothing=0.1f, float base_noise_amp=0.2f, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Generates a synthetic "badlands" terrain heightmap.
Definition badlands.cpp:15
Array mountain_range_radial(glm::ivec2 shape, glm::vec2 kw, std::uint32_t seed, float half_width=0.2f, float angle_spread_ratio=0.5f, float core_size_ratio=1.f, glm::vec2 center={0.5f, 0.5f}, int octaves=8, float weight=0.7f, float persistence=0.5f, float lacunarity=2.f, const Array *p_ctrl_param=nullptr, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, const Array *p_angle=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Generates a heightmap representing a radial mountain range.
Definition primitives_gpu.cpp:449
Array basalt_field(glm::ivec2 shape, glm::vec2 kw, std::uint32_t seed, float warp_kw=4.f, float large_scale_warp_amp=0.2f, float large_scale_gain=6.f, float large_scale_amp=0.2f, float medium_scale_kw_ratio=3.f, float medium_scale_warp_amp=1.f, float medium_scale_gain=7.f, float medium_scale_amp=0.08f, float small_scale_kw_ratio=10.f, float small_scale_amp=0.1f, float small_scale_overlay_amp=0.002f, float rugosity_kw_ratio=1.f, float rugosity_amp=1.f, bool flatten_activate=true, float flatten_kw_ratio=1.f, float flatten_amp=0.f, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Generates a synthetic procedural terrain resembling basaltic landforms.
Definition basalt_field.cpp:17
Array shattered_peak(glm::ivec2 shape, std::uint32_t seed, float scale=1.f, int octaves=8, float peak_kw=4.f, float rugosity=0.f, float angle=30.f, float gamma=1.f, bool add_deposition=true, float bulk_amp=0.3f, float base_noise_amp=0.1f, float k_smoothing=0.f, glm::vec2 center={0.5f, 0.5f}, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Generates a synthetic "shattered peak" terrain heightmap.
Definition shattered_peak.cpp:17
Array rugosity(const Array &z, int ir, bool convex=true)
See hmap::rugosity.
Definition local_metrics_gpu.cpp:194
Array mountain_tibesti(glm::ivec2 shape, std::uint32_t seed, float scale=1.f, int octaves=8, float peak_kw=20.f, float rugosity=0.f, float angle=30.f, float angle_spread_ratio=0.25f, float gamma=1.f, bool add_deposition=true, float bulk_amp=1.f, float base_noise_amp=0.1f, glm::vec2 center={0.5f, 0.5f}, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Generates a synthetic "Tibesti" mountain heightmap.
Definition mountain_tibesti.cpp:18
Array island(const Array &land_mask, const Array *p_noise_r=nullptr, float apex_elevation=1.f, bool filter_distance=true, int filter_ir=32, float slope_min=0.1f, float slope_max=8.f, float slope_start=0.5f, float slope_end=1.f, float slope_noise_intensity=0.5f, float k_smooth=0.05f, float radial_noise_intensity=0.3f, float radial_profile_gain=2.f, float water_decay=0.05f, float water_depth=0.3f, float lee_angle=30.f, float lee_amp=0.f, float uplift_amp=0.f, Array *p_water_depth=nullptr, Array *p_inland_mask=nullptr)
Generates an island heightmap from a land mask using radial profiles, slope shaping,...
Definition island.cpp:116
Array mountain_inselberg(glm::ivec2 shape, std::uint32_t seed, float scale=1.f, int octaves=8, float rugosity=0.2f, float angle=45.f, float gamma=1.1f, bool round_shape=false, bool add_deposition=true, float bulk_amp=0.2f, float base_noise_amp=0.2f, float k_smoothing=0.1f, glm::vec2 center={0.5f, 0.5f}, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Generates a synthetic mountain-like inselberg (isolated hill) heightmap.
Definition mountain_inselberg.cpp:18
Array mountain_cone(glm::ivec2 shape, std::uint32_t seed, float scale=1.f, int octaves=8, float peak_kw=4.f, float rugosity=0.f, float angle=45.f, float k_smoothing=0.f, float gamma=0.5f, float cone_alpha=1.f, float ridge_amp=0.4f, float base_noise_amp=0.05f, glm::vec2 center={0.5f, 0.5f}, const Array *p_noise_x=nullptr, const Array *p_noise_y=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Generates a procedural "mountain cone" heightmap using fractal noise and Voronoi patterns.
Definition mountain_cone.cpp:19
Definition algebra.hpp:23
Array rift(glm::ivec2 shape, float angle, float radius=0.1f, float axial_slope=0.2f, float depth=0.5f, bool scale_with_depth=true, RadialProfile profile=RadialProfile::RP_SMOOTHSTEP, float profile_param=0.f, float bottom_extent=0.1, float bottom_depth=0.05f, RadialProfile bottom_profile=RadialProfile::RP_SQRT, float bottom_profile_param=0.f, bool bottom_force_minimum_depth=true, float outer_slope=0.5f, const Array *p_noise_r=nullptr, const Array *p_noise_offset=nullptr, glm::vec2 center={0.5f, 0.5f}, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f}, Array *p_rift_mask=nullptr, Array *p_bottom_mask=nullptr)
Generate a rift-shaped primitive.
Definition rift.cpp:17
Array crater(glm::ivec2 shape, float radius, glm::vec2 center={0.5f, 0.5f}, float angle=30.f, float inner_depth=0.1f, float inner_exp=3.f, float lip_height=0.02f, float lip_extent=0.25f, float lip_exp=2.f, float asym_ratio=0.8f, float central_peak_height=0.01f, float central_peak_extent=0.4f, int n_terraces=0, float terrace_extent=0.1f, float terrace_exp=2.f, float terrace_persistence=0.5f, const Array *p_noise_r=nullptr, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f}, Array *p_crater_mask=nullptr, Array *p_inner_crater_mask=nullptr)
Generate a procedural impact crater heightmap.
Definition crater.cpp:66
RadialProfile
Radial profile type.
Definition profiles.hpp:51
@ RP_SMOOTHSTEP
Definition profiles.hpp:55
@ RP_SQRT
Definition profiles.hpp:58
Array island_land_mask(glm::ivec2 shape, float radius, std::uint32_t seed, float displacement=0.2f, NoiseType noise_type=NoiseType::SIMPLEX2S, float kw=4.f, int octaves=8, float weight=0.f, float persistence=0.5f, float lacunarity=2.f, const glm::vec2 ¢er={0.5f, 0.5f}, const glm::vec4 &bbox={0.f, 1.f, 0.f, 1.f})
Generates a 2D island mask by perturbing a radial boundary with noise.
Definition island.cpp:24
Array caldera(glm::ivec2 shape, float radius, float sigma_inner, float sigma_outer, float z_bottom, const Array *p_noise, float noise_amp_r, float noise_ratio_z, glm::vec2 center={0.5f, 0.5f}, glm::vec4 bbox={0.f, 1.f, 0.f, 1.f})
Return a caldera-shaped heightmap.
Definition caldera.cpp:13
float angle(const Point &p1, const Point &p2)
Computes the angle between two points relative to the x-axis.
Definition points.cpp:46
NoiseType
Enumeration of various noise types used for procedural generation.
Definition functions.hpp:67
@ SIMPLEX2S
OpenSimplex2S.
Definition functions.hpp:73