include/terraingen/layers/craters/crater_fields.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // SPDX-License-Identifier: BSD-3-Clause | ||
| 2 | |||
| 3 | /// @file | ||
| 4 | /// @brief The field lists of craters, their generation, shaping and secondaries, and the crater | ||
| 5 | /// enum names. | ||
| 6 | #pragma once | ||
| 7 | |||
| 8 | #include "terraingen/layers/craters/crater.h" | ||
| 9 | #include "terraingen/layers/craters/crater_layer.h" | ||
| 10 | #include "terraingen/layers/craters/degradation/diffusion.h" | ||
| 11 | #include "terraingen/layers/craters/generation/population.h" | ||
| 12 | #include "terraingen/layers/craters/generation/spacing.h" | ||
| 13 | #include "terraingen/layers/craters/profiles/fassett_thomson.h" | ||
| 14 | #include "terraingen/layers/craters/rays.h" | ||
| 15 | #include "terraingen/layers/craters/secondary_model.h" | ||
| 16 | #include "terraingen/layers/craters/shaping/apply_options.h" | ||
| 17 | #include "terraingen/layers/craters/shaping/irregularity.h" | ||
| 18 | #include "terraingen/layers/craters/shaping/slope.h" | ||
| 19 | #include "terraingen/layers/layer_fields.h" | ||
| 20 | #include "terraingen/random/random_fields.h" | ||
| 21 | #include "terraingen/util/option_fields.h" | ||
| 22 | |||
| 23 | #include <array> | ||
| 24 | #include <limits> | ||
| 25 | |||
| 26 | namespace terraingen { | ||
| 27 | |||
| 28 | template <> struct EnumNames<FassettThomsonRim> { | ||
| 29 | static constexpr std::array<EnumEntry<FassettThomsonRim>, 3> kValues{{ | ||
| 30 | {"original", FassettThomsonRim::Original, | ||
| 31 | "The published fits, whose interior and exterior meet at 0.98 radii."}, | ||
| 32 | {"at_one_radius", FassettThomsonRim::AtOneRadius, | ||
| 33 | "Interior fit extended to 1.0 radii so the rim lies at the stated diameter, as " | ||
| 34 | "synthterrain's FT_Crater; leaves a small step at the rim."}, | ||
| 35 | {"plateau", FassettThomsonRim::Plateau, | ||
| 36 | "A flat rim at the fresh rim height from 0.98 to 1.02 radii, after Fassett et al. (2022), " | ||
| 37 | "as synthterrain's FTmod_Crater."}, | ||
| 38 | }}; | ||
| 39 | }; | ||
| 40 | |||
| 41 | template <> struct EnumNames<CraterOrder> { | ||
| 42 | static constexpr std::array<EnumEntry<CraterOrder>, 2> kValues{{ | ||
| 43 | {"oldest_first", CraterOrder::OldestFirst, | ||
| 44 | "Oldest craters first, then larger first: the physical order, so younger craters " | ||
| 45 | "overprint older ones."}, | ||
| 46 | {"largest_first", CraterOrder::LargestFirst, | ||
| 47 | "Largest craters first, then older first, so smaller craters overprint larger ones."}, | ||
| 48 | }}; | ||
| 49 | }; | ||
| 50 | |||
| 51 | template <> struct EnumNames<CraterDatum> { | ||
| 52 | static constexpr std::array<EnumEntry<CraterDatum>, 4> kValues{{ | ||
| 53 | {"none", CraterDatum::None, | ||
| 54 | "No datum: the crater profile is added onto the terrain everywhere."}, | ||
| 55 | {"plane", CraterDatum::Plane, | ||
| 56 | "Interior cut relative to a least-squares plane over the fit footprint, keeping regional " | ||
| 57 | "slopes."}, | ||
| 58 | {"mean_height", CraterDatum::MeanHeight, | ||
| 59 | "Interior cut relative to a flat datum at the mean height over the fit footprint."}, | ||
| 60 | {"center_height", CraterDatum::CenterHeight, | ||
| 61 | "Interior cut relative to a flat datum at the terrain height under the crater center."}, | ||
| 62 | }}; | ||
| 63 | }; | ||
| 64 | |||
| 65 | template <> struct EnumNames<RimRoughnessModel> { | ||
| 66 | static constexpr std::array<EnumEntry<RimRoughnessModel>, 2> kValues{{ | ||
| 67 | {"power_law", RimRoughnessModel::PowerLaw, | ||
| 68 | "Rim harmonics with amplitudes falling as a power of the harmonic number, of a given RMS: " | ||
| 69 | "a simple, configurable spectrum."}, | ||
| 70 | {"du_2024", RimRoughnessModel::Du2024, | ||
| 71 | "The fitted rim-crest spectra of fresh lunar craters of Du et al. (2024), from each " | ||
| 72 | "crater's diameter."}, | ||
| 73 | }}; | ||
| 74 | }; | ||
| 75 | |||
| 76 | 176 | template <typename IO> void Fields(IO& io, Crater& crater) { | |
| 77 | 176 | io("x", crater.x, | |
| 78 | "Center along x in the surface's coordinates; the longitude in degrees on a sphere."); | ||
| 79 | 175 | io("y", crater.y, | |
| 80 | "Center along y in the surface's coordinates; the latitude in degrees on a sphere."); | ||
| 81 | 175 | io("diameter_m", crater.diameter, "Rim-to-rim diameter, in meters.", "m", Above(0.0)); | |
| 82 | 174 | io("age_gyr", crater.ageGyr, | |
| 83 | "Age in Gyr; older craters are more degraded under a degradation model and are applied " | ||
| 84 | "earlier in oldest-first order.", | ||
| 85 | 174 | "Gyr", AtLeast(0.0)); | |
| 86 | 173 | io("id", crater.id, | |
| 87 | "Stable ID that seeds the crater's outline; 0 derives one from its position and diameter."); | ||
| 88 | 173 | io("depth_m", crater.depth, | |
| 89 | "Rim-to-floor depth in meters, in place of the one the degradation model and age " | ||
| 90 | "give; unset keeps the model's.", | ||
| 91 | 173 | "m", Above(0.0)); | |
| 92 | 172 | io("rim_height_m", crater.rimHeight, | |
| 93 | "Height of the rim crest above the surface the crater formed on, in meters; needs a " | ||
| 94 | "depth. Unset lowers the fresh rim in proportion to the depth.", | ||
| 95 | 172 | "m", AtLeast(0.0)); | |
| 96 | 171 | io("replace", crater.replace, | |
| 97 | "Replaces whatever the terrain holds there with a sharp crater of this diameter and depth, " | ||
| 98 | "cut into a plane fitted around it, such as a crater a DEM holds blurred; apply.replacement " | ||
| 99 | "sets how far. It takes the irregular outline, secondaries and albedo generated craters " | ||
| 100 | "get."); | ||
| 101 | 171 | } | |
| 102 | |||
| 103 | 323982 | template <typename IO> void Fields(IO& io, CraterReplacement& replacement) { | |
| 104 | 323982 | io("start_radii", replacement.startRadii, | |
| 105 | "Distance from the center, in crater radii, up to which a replacing crater replaces the " | ||
| 106 | "terrain in full.", | ||
| 107 | 323982 | "", Above(0.0)); | |
| 108 | 324125 | io("end_radii", replacement.endRadii, | |
| 109 | "Distance from the center, in crater radii, from which nothing is replaced; at most the " | ||
| 110 | "profile's reach, and unset for that reach, so the replaced crater's rim goes too.", | ||
| 111 | 324125 | "", Above(0.0)); | |
| 112 | 324010 | io("fit_width_radii", replacement.fitWidthRadii, | |
| 113 | "Width, in crater radii, of the ring outside end_radii that the replacing crater's plane " | ||
| 114 | "datum is fitted on.", | ||
| 115 | 324010 | "", Above(0.0)); | |
| 116 | 324103 | } | |
| 117 | |||
| 118 | /// The fields of inherited craters but their list, which configurations read from a file. | ||
| 119 | 1032 | template <typename IO> void Fields(IO& io, InheritedCraters& inherited) { | |
| 120 | 1032 | io("min_source_px", inherited.minSourcePixels, | |
| 121 | "Source cells across from which a listed crater is stamped again sharp and generated " | ||
| 122 | "craters are dropped; smaller ones are left to generation, which fills the gaps. Unset " | ||
| 123 | "follows source_resolves_px; lower it to clean up the smaller craters a coarser run drew " | ||
| 124 | "blurred into the source.", | ||
| 125 | 1032 | "px", Above(0.0)); | |
| 126 | 1030 | io("max_source_px", inherited.maxSourcePixels, | |
| 127 | "Source cells across from which listed craters are left as the source holds them, since " | ||
| 128 | "interpolation barely softens them; unset stamps every one from min_source_px.", | ||
| 129 | 1030 | "px", Above(0.0)); | |
| 130 | 1030 | } | |
| 131 | |||
| 132 | 266774 | template <typename IO> void Fields(IO& io, CraterSpacing& spacing) { | |
| 133 | 266774 | io("diameter_ratio", spacing.diameterRatio, | |
| 134 | "Largest ratio of two craters' diameters for them to count as similar in size and be kept " | ||
| 135 | "apart.", | ||
| 136 | 266774 | "", AtLeast(1.0)); | |
| 137 | 266732 | io("separation", spacing.separation, | |
| 138 | "Least distance between the centers of similar-size craters, in larger diameters; 0 " | ||
| 139 | "disables spacing.", | ||
| 140 | 533464 | "", AtLeast(0.0)); | |
| 141 | 266639 | } | |
| 142 | |||
| 143 | /// The fields of which craters a generation draws: their diameter range, spacing and cap. | ||
| 144 | 780 | template <typename IO> void CraterRangeFields(IO& io, CraterGenerationOptions& options) { | |
| 145 | 780 | io("min_diameter_m", options.minDiameter, | |
| 146 | "Smallest crater generated, in meters; lower values add many more small craters.", "m", | ||
| 147 | 780 | Above(0.0)); | |
| 148 | 777 | io("max_diameter_m", options.maxDiameter, | |
| 149 | 777 | "Largest crater generated, in meters; above the smallest.", "m", Above(0.0)); | |
| 150 | 776 | io("spacing", options.spacing, | |
| 151 | "Keeps craters of similar size apart by removing conflicting ones, which lowers the density " | ||
| 152 | "below the model's."); | ||
| 153 | 774 | io("max_craters", options.maxCraters, | |
| 154 | "Most generated craters kept, the largest first; unset keeps all. Manual craters are always " | ||
| 155 | "kept, and a cap means tiles no longer match the whole grid."); | ||
| 156 | 774 | } | |
| 157 | |||
| 158 | /// The fields of a crater generation but its manual craters, completeness, callbacks, surface and | ||
| 159 | /// log name, which code gives. | ||
| 160 | 3 | template <typename IO> void Fields(IO& io, CraterGenerationOptions& options) { | |
| 161 | 3 | CraterRangeFields(io, options); | |
| 162 | 3 | io("margin_radii", options.marginRadii, | |
| 163 | "Also keeps craters centered outside the region within this many of their radii of it.", "", | ||
| 164 | 3 | AtLeast(0.0)); | |
| 165 | 3 | io("cell_size_factor", options.cellSizeFactor, | |
| 166 | "Side of the cells craters are drawn in, as a multiple of each band's largest diameter.", "", | ||
| 167 | 3 | Above(0.0)); | |
| 168 | 3 | io("max_expected_craters", options.maxExpectedCraters, | |
| 169 | "Most craters a generation may expect, to catch requests that would exhaust memory.", "", | ||
| 170 | 3 | AtLeast(0.0)); | |
| 171 | 3 | io("min_resolved_diameter_m", options.minResolvedDiameter, | |
| 172 | "Bands whose craters are all smaller than this, in meters, are skipped; 0 generates every " | ||
| 173 | "band.", | ||
| 174 | 3 | "m", AtLeast(0.0)); | |
| 175 | 3 | io("max_band_diameter_m", options.maxBandDiameter, | |
| 176 | "Bands whose craters are all larger than this, in meters, are skipped unless spacing or a " | ||
| 177 | "cap is on; infinity generates every band.", | ||
| 178 | 3 | "m", Above(0.0)); | |
| 179 | 3 | io("threads", options.threads, "Threads the cells are drawn on; 0 for every hardware thread."); | |
| 180 | 3 | } | |
| 181 | |||
| 182 | 162367 | template <typename IO> void Fields(IO& io, CraterBlend& blend) { | |
| 183 | 162367 | io("start_radii", blend.startRadii, | |
| 184 | "Distance from the center, in crater radii, up to which the interior is fully replaced.", "", | ||
| 185 | 162367 | AtLeast(0.0)); | |
| 186 | 162398 | io("end_radii", blend.endRadii, | |
| 187 | "Distance from the center, in crater radii, from which the surrounding terrain is draped " | ||
| 188 | "unchanged.", | ||
| 189 | 162398 | "", Above(0.0)); | |
| 190 | 162549 | io("shape", blend.shape, "Curve of the transition from the replaced interior to the exterior."); | |
| 191 | 162630 | } | |
| 192 | |||
| 193 | /// The fields of irregular craters' rough, wavy rims. | ||
| 194 | 324242 | template <typename IO> void RoughRimFields(IO& io, CraterIrregularity& irregularity) { | |
| 195 | 324242 | io("rough_share", irregularity.roughShare, "Share of eligible craters given rough, wavy rims.", | |
| 196 | 324242 | "", UnitInterval()); | |
| 197 | 324253 | io("model", irregularity.model, "How rough rims are drawn."); | |
| 198 | 648030 | io("scatter", irregularity.scatter, | |
| 199 | "With du_2024, scatters each crater's spectrum by the fits' measured misfits and noise."); | ||
| 200 | 324178 | io("max_deviation", irregularity.maxDeviation, | |
| 201 | "With du_2024, the largest deviation of a rim from a circle, in radii; outlines beyond it " | ||
| 202 | "are scaled down to it.", | ||
| 203 | 324178 | "", AboveUpTo(0.0, 0.5)); | |
| 204 | 324206 | io("roughness", irregularity.roughness, | |
| 205 | "With power_law, the RMS deviation of a rough rim from a circle, in crater radii, drawn per " | ||
| 206 | "crater."); | ||
| 207 | 324211 | io("spectral_slope", irregularity.spectralSlope, | |
| 208 | "With power_law, the exponent s of the rim harmonics' amplitudes, falling as k^-s, drawn " | ||
| 209 | "per crater; higher values leave less fine waviness."); | ||
| 210 | 324377 | io("min_harmonic", irregularity.minHarmonic, | |
| 211 | 324377 | "With power_law, the lowest harmonic of the rim's waviness.", "", Between(1.0, 64.0)); | |
| 212 | 324115 | io("max_harmonic", irregularity.maxHarmonic, | |
| 213 | "With power_law, the highest harmonic of the rim's waviness; higher harmonics add finer " | ||
| 214 | "wiggles.", | ||
| 215 | 324115 | "", Between(1.0, 64.0)); | |
| 216 | 324347 | } | |
| 217 | |||
| 218 | /// The fields of irregular craters stretched into ellipses. | ||
| 219 | 324061 | template <typename IO> void ElongationFields(IO& io, CraterIrregularity& irregularity) { | |
| 220 | 324061 | io("elongated_share", irregularity.elongatedShare, | |
| 221 | 324061 | "Share of eligible craters made elliptical, keeping their area.", "", UnitInterval()); | |
| 222 | 324246 | io("ellipticity", irregularity.ellipticity, | |
| 223 | "Long over short rim-to-rim diameter of elliptical craters, drawn per crater; at least 1."); | ||
| 224 | 324321 | io("heading_deg", irregularity.headingDegrees, | |
| 225 | "Heading of elliptical craters' long axes, in degrees counter-clockwise from +x (local east " | ||
| 226 | "on a body); unset gives random headings.", | ||
| 227 | "deg"); | ||
| 228 | 324372 | io("heading_spread_deg", irregularity.headingSpreadDegrees, | |
| 229 | "Largest random turn of a long axis either way from the heading, in degrees.", "deg", | ||
| 230 | 324372 | AtLeast(0.0)); | |
| 231 | 324300 | } | |
| 232 | |||
| 233 | /// The fields of the radial marks down irregular craters' walls. | ||
| 234 | 323711 | template <typename IO> void RadialMarkFields(IO& io, CraterIrregularity& irregularity) { | |
| 235 | 323711 | io("marks_share", irregularity.marksShare, | |
| 236 | "Share of eligible craters given radial marks: ridges and grooves down the " | ||
| 237 | "wall, strongest where it is steepest.", | ||
| 238 | 323711 | "", UnitInterval()); | |
| 239 | 324313 | io("marks_amplitude", irregularity.marksAmplitude, | |
| 240 | "Largest radial shift of the wall by the marks, in crater radii, drawn per crater; below " | ||
| 241 | "marks_fade_radii / 3.75."); | ||
| 242 | 324367 | io("marks_knots", irregularity.marksKnots, | |
| 243 | "Random shifts around the crater the marks pass through; more knots give narrower marks.", | ||
| 244 | 324367 | "", Between(3.0, 1024.0)); | |
| 245 | 324335 | io("marks_inner_radii", irregularity.marksInnerRadii, | |
| 246 | "Distance from the center, in crater radii, where the marks reach full strength.", "", | ||
| 247 | 324335 | Inside(0.0, 1.0)); | |
| 248 | 324338 | io("marks_outer_radii", irregularity.marksOuterRadii, | |
| 249 | "Distance from the center, in crater radii, where the marks start to fade; at most 1 minus " | ||
| 250 | "marks_fade_radii.", | ||
| 251 | 324338 | "", Inside(0.0, 1.0)); | |
| 252 | 324367 | io("marks_fade_radii", irregularity.marksFadeRadii, | |
| 253 | 324367 | "Width, in crater radii, over which the marks fade in and out.", "", AboveUpTo(0.0, 0.5)); | |
| 254 | 324392 | } | |
| 255 | |||
| 256 | 323873 | template <typename IO> void Fields(IO& io, CraterIrregularity& irregularity) { | |
| 257 | 323873 | io("enabled", irregularity.enabled, | |
| 258 | "Gives eligible craters irregular, non-circular outlines; off keeps every crater round."); | ||
| 259 | 324269 | io("seed", irregularity.seed, | |
| 260 | "Seed the outlines are drawn with, along with each crater's ID; changing it reshapes every " | ||
| 261 | "irregular crater. Unset follows the layer's seed."); | ||
| 262 | 324194 | SelectionFields(io, irregularity.selection, "craters made irregular", | |
| 263 | "Makes manual craters irregular too; otherwise only generated and replacing " | ||
| 264 | "craters are."); | ||
| 265 | 324127 | RoughRimFields(io, irregularity); | |
| 266 | 324263 | ElongationFields(io, irregularity); | |
| 267 | 324300 | RadialMarkFields(io, irregularity); | |
| 268 | 324364 | } | |
| 269 | |||
| 270 | 162626 | template <typename IO> void Fields(IO& io, RimSmoothing& smoothing) { | |
| 271 | 162626 | io("sigma_radii", smoothing.sigmaRadii, | |
| 272 | "Deviation of the Gaussian the profile is smoothed with across distance, in crater radii; " | ||
| 273 | "larger values round rims more, and 0 leaves them sharp.", | ||
| 274 | 162626 | "", AtLeast(0.0)); | |
| 275 | 162576 | io("inner_radii", smoothing.innerRadii, | |
| 276 | 162576 | "Inner edge of the smoothed band around the rim, in crater radii.", "", FromBelow(0.0, 1.0)); | |
| 277 | 162582 | io("outer_radii", smoothing.outerRadii, | |
| 278 | 162582 | "Outer edge of the smoothed band around the rim, in crater radii.", "", Above(1.0)); | |
| 279 | 324851 | io("shape", smoothing.shape, | |
| 280 | "How the smoothing fades from full at the rim to none at the band's edges."); | ||
| 281 | 162585 | io("strength", smoothing.strength, | |
| 282 | "Share of the smoothed height used at the rim; lower values keep more of the " | ||
| 283 | "sharp crest.", | ||
| 284 | 162585 | "", UnitInterval()); | |
| 285 | 162610 | } | |
| 286 | |||
| 287 | 162635 | template <typename IO> void Fields(IO& io, CraterNoise& noise) { | |
| 288 | 162635 | io("amplitude", noise.amplitude, | |
| 289 | "Amplitude of the noise over the whole footprint, as a share of the crater diameter; it " | ||
| 290 | "fades out beyond the rim to the profile's reach, and 0 adds none.", | ||
| 291 | 162635 | "", AtLeast(0.0)); | |
| 292 | 162577 | io("wavelength_radii", noise.wavelengthRadii, | |
| 293 | 162577 | "Wavelength of the footprint noise's first octave, in crater radii.", "", Above(0.0)); | |
| 294 | 162583 | io("octaves", noise.octaves, "Octaves of both noises.", "", Between(1.0, 12.0)); | |
| 295 | 162604 | io("gain", noise.gain, "Weight ratio between successive octaves.", "", Above(0.0)); | |
| 296 | 162533 | io("rim_amplitude", noise.rimAmplitude, | |
| 297 | "Amplitude of the extra noise in the band around the rim, as a share of the crater " | ||
| 298 | "diameter; 0 adds none.", | ||
| 299 | 162533 | "", AtLeast(0.0)); | |
| 300 | 162569 | io("rim_wavelength_radii", noise.rimWavelengthRadii, | |
| 301 | 162569 | "Wavelength of the rim noise's first octave, in crater radii.", "", Above(0.0)); | |
| 302 | 162565 | io("rim_inner_radii", noise.rimInnerRadii, "Inner edge of the rim noise band, in crater radii.", | |
| 303 | 162565 | "", FromBelow(0.0, 1.0)); | |
| 304 | 162575 | io("rim_outer_radii", noise.rimOuterRadii, "Outer edge of the rim noise band, in crater radii.", | |
| 305 | 162575 | "", Above(1.0)); | |
| 306 | 162583 | io("seed", noise.seed, "Varies the noise of every crater; unset follows the layer's seed."); | |
| 307 | 162580 | } | |
| 308 | |||
| 309 | 162493 | template <typename IO> void Fields(IO& io, CraterTexture& texture) { | |
| 310 | 162493 | io("wall_streaks", texture.wallStreaks, | |
| 311 | "Amplitude of the radial gullies down a fresh crater's inner wall, as a share of its " | ||
| 312 | "diameter; 0 adds none.", | ||
| 313 | 162493 | "", AtLeast(0.0)); | |
| 314 | 162567 | io("wall_streak_width_radii", texture.wallStreakWidthRadii, | |
| 315 | 162567 | "Width of the gullies across the wall, in crater radii.", "", Above(0.0)); | |
| 316 | 162594 | io("ejecta", texture.ejecta, | |
| 317 | "Amplitude of the hummocky, radially lineated ejecta around a fresh crater, as a share of " | ||
| 318 | "the ejecta's thickness (McGetchin et al. 1973); 0 adds none.", | ||
| 319 | 162594 | "", AtLeast(0.0)); | |
| 320 | 162593 | io("ejecta_lineation_radii", texture.ejectaLineationRadii, | |
| 321 | 162593 | "Width of the ejecta's lineations across, in crater radii at the rim.", "", Above(0.0)); | |
| 322 | 162590 | io("mantling", texture.mantling, | |
| 323 | "Share of older relief buried under the ejecta at the rim, falling with their thickness; " | ||
| 324 | "needs a datum.", | ||
| 325 | 162590 | "", UnitInterval()); | |
| 326 | 162591 | io("ejecta_reach_radii", texture.ejectaReachRadii, | |
| 327 | 162591 | "How far ejecta texture and burial reach, in crater radii.", "", Above(1.0)); | |
| 328 | 162609 | io("min_freshness", texture.minFreshness, | |
| 329 | "Freshness (depth over fresh depth) at or below which gullies and ejecta texture are worn " | ||
| 330 | "away.", | ||
| 331 | 162609 | "", FromBelow(0.0, 1.0)); | |
| 332 | 162615 | io("seed", texture.seed, "Varies the texture of every crater; unset follows the layer's seed."); | |
| 333 | 162525 | } | |
| 334 | |||
| 335 | 323960 | template <typename IO> void Fields(IO& io, CraterTerraces& terraces) { | |
| 336 | 323960 | io("enabled", terraces.enabled, | |
| 337 | "Steps the walls of large craters into slump terraces: benches and scarps between the " | ||
| 338 | "floor and the rim crest."); | ||
| 339 | 324205 | io("seed", terraces.seed, | |
| 340 | "Varies each crater's benches, the arcs they cover and how they wander; unset follows the " | ||
| 341 | "layer's seed."); | ||
| 342 | 324294 | io("onset_diameter_m", terraces.onsetDiameter, | |
| 343 | "Smallest terraced crater, in meters; 20 km on the Moon, where half of fresh mare craters " | ||
| 344 | "are terraced, and about 8 km on Mars.", | ||
| 345 | 324294 | "m", Above(0.0)); | |
| 346 | 324205 | io("full_diameter_m", terraces.fullDiameter, | |
| 347 | "Diameter in meters from which every crater has its most benches, over most of its wall; " | ||
| 348 | "above the onset diameter.", | ||
| 349 | 324205 | "m", Above(0.0)); | |
| 350 | 324296 | io("min_benches", terraces.minBenches, "Benches at the onset diameter.", "", | |
| 351 | 324296 | Between(1.0, 12.0)); | |
| 352 | 324158 | io("max_benches", terraces.maxBenches, | |
| 353 | "Benches from the full diameter; complex lunar craters usually have more than 3.", "", | ||
| 354 | 324158 | Between(1.0, 12.0)); | |
| 355 | 324256 | io("bench_slope_deg", terraces.benchSlopeDegrees, | |
| 356 | "Slope of a bench, in degrees; mapped lunar terraces slope under 5 degrees.", "deg", | ||
| 357 | 324256 | Inside(0.0, 45.0)); | |
| 358 | 323920 | io("scarp_share", terraces.scarpShare, | |
| 359 | "Least share of each step's width the scarps take; steeper steps give them more, and the " | ||
| 360 | "bench takes the rest.", | ||
| 361 | 323920 | "", Inside(0.0, 1.0)); | |
| 362 | 324229 | io("scarp_slope_deg", terraces.scarpSlopeDegrees, | |
| 363 | "Slope the scarps rise at, in degrees, above the bench slope; each step gives its scarps " | ||
| 364 | "the share of its width that keeps them near it.", | ||
| 365 | 324229 | "deg", Inside(0.0, 60.0)); | |
| 366 | 324251 | io("arc_share", terraces.arcShare, | |
| 367 | "Share of the wall's circumference each bench covers at the onset diameter; it rises to " | ||
| 368 | "0.9 at the full diameter, and 1 gives benches all the way round.", | ||
| 369 | 324251 | "", AboveUpTo(0.0, 1.0)); | |
| 370 | 324212 | io("rim_variation", terraces.rimVariation, | |
| 371 | 324212 | "How far the bench radii wander around the rim, in crater radii.", "", AtLeast(0.0)); | |
| 372 | 324116 | io("block_offset", terraces.blockOffset, | |
| 373 | "How far each slump block's headscarp steps from its neighbors', as a share of the room " | ||
| 374 | "between scarps.", | ||
| 375 | 324116 | "", Between(0.0, 1.0)); | |
| 376 | 324174 | io("block_gaps", terraces.blockGaps, | |
| 377 | "Share of slump blocks missing from each bench, breaking the benches into segments.", "", | ||
| 378 | 324174 | FromBelow(0.0, 1.0)); | |
| 379 | 324231 | io("min_freshness", terraces.minFreshness, | |
| 380 | "Freshness, current over fresh depth, below which the terraces are gone; they soften as " | ||
| 381 | "the crater wears down to it.", | ||
| 382 | 324231 | "", FromBelow(0.0, 1.0)); | |
| 383 | 324246 | } | |
| 384 | |||
| 385 | 323796 | template <typename IO> void Fields(IO& io, CraterPeaks& peaks) { | |
| 386 | 323796 | io("enabled", peaks.enabled, | |
| 387 | "Builds the central peaks of complex craters from massifs: mountains clustered about the " | ||
| 388 | "center in place of the profile's round dome."); | ||
| 389 | 324259 | io("seed", peaks.seed, | |
| 390 | "Varies each crater's massifs and their noise; unset follows the layer's seed."); | ||
| 391 | 324227 | io("min_massifs", peaks.minMassifs, "Fewest massifs of a peak.", "", Between(1.0, 8.0)); | |
| 392 | 324146 | io("max_massifs", peaks.maxMassifs, "Most massifs of a peak.", "", Between(1.0, 8.0)); | |
| 393 | 324272 | io("spread_radii", peaks.spreadRadii, | |
| 394 | "How far the lesser massifs' centers scatter from the crater's center, in peak base " | ||
| 395 | "radii.", | ||
| 396 | 324272 | "", Between(0.0, 2.0)); | |
| 397 | 324227 | io("elongation", peaks.elongation, | |
| 398 | "Most aspect ratio of a massif's footprint; 1 keeps them round, larger makes ridges.", "", | ||
| 399 | 324227 | Between(1.0, 4.0)); | |
| 400 | 324250 | io("chain_spread_deg", peaks.chainSpreadDegrees, | |
| 401 | "Spread of the lesser massifs' bearings about a chain through the center, in degrees: " | ||
| 402 | "about 70 strings them across the floor, wide spreads scatter them around it into stars " | ||
| 403 | "and crosses.", | ||
| 404 | 324250 | "deg", Between(0.0, 360.0)); | |
| 405 | 323932 | io("sharpness", peaks.sharpness, "How sharp the massifs' crests are: 0 domes, 1 spires.", "", | |
| 406 | 323932 | Between(0.0, 1.0)); | |
| 407 | 324324 | io("lopsidedness", peaks.lopsidedness, | |
| 408 | 324324 | "How far each massif's summit sits off its center toward one flank.", "", Between(0.0, 1.0)); | |
| 409 | 324286 | io("height_variation", peaks.heightVariation, | |
| 410 | "How much lower than the main massif the others may be, as a share of its height.", "", | ||
| 411 | 324286 | Between(0.0, 1.0)); | |
| 412 | 324292 | io("roughness", peaks.roughness, | |
| 413 | "Ridged noise over the massifs, as a share of their height, carving spurs, gullies and " | ||
| 414 | "lesser summits; worn peaks lose it.", | ||
| 415 | 324292 | "", Between(0.0, 1.0)); | |
| 416 | 324341 | io("roughness_wavelength", peaks.roughnessWavelength, | |
| 417 | 324341 | "Wavelength of the massifs' noise, in peak base radii.", "", Above(0.0)); | |
| 418 | 324295 | io("warp", peaks.warp, "How far the noise warps the massifs' outlines, in peak base radii.", "", | |
| 419 | 324295 | Between(0.0, 0.3)); | |
| 420 | 324368 | io("height_scale", peaks.heightScale, "The massifs' height over the profile's peak height.", "", | |
| 421 | 324368 | AboveUpTo(0.0, 4.0)); | |
| 422 | 324295 | io("width_scale", peaks.widthScale, | |
| 423 | 324295 | "The massifs' spread and size over the profile's peak base.", "", AboveUpTo(0.0, 3.0)); | |
| 424 | 323780 | } | |
| 425 | |||
| 426 | 323842 | template <typename IO> void Fields(IO& io, CraterSlopeResponse& slope) { | |
| 427 | 323842 | io("asymmetric", slope.asymmetric, | |
| 428 | "Shapes craters asymmetrically along the slope of the ground beneath the layer; off keeps " | ||
| 429 | "them the same on any slope."); | ||
| 430 | 324145 | io("seed", slope.seed, | |
| 431 | "Varies how far each crater's floor is offset; unset follows the layer's seed."); | ||
| 432 | 324164 | io("floor_offset", slope.floorOffset, | |
| 433 | "How far the deepest point lies downslope of the center, in diameters, drawn per crater; " | ||
| 434 | "below 0.23."); | ||
| 435 | 324154 | io("upslope_rim", slope.upslopeRim, | |
| 436 | "Share of the raised rim and ejecta kept straight upslope; the rest returns toward the " | ||
| 437 | "sides.", | ||
| 438 | 324154 | "", UnitInterval()); | |
| 439 | 324243 | io("full_slope_deg", slope.fullSlopeDegrees, | |
| 440 | "Slope at which the asymmetry is complete, in degrees; it rises from none on level ground.", | ||
| 441 | 324243 | "deg", Above(0.0)); | |
| 442 | 324222 | io("critical_gradient", slope.criticalGradient, | |
| 443 | "Critical gradient Sc, rise over run, toward which downslope transport grows without bound: " | ||
| 444 | "a crater on a regional gradient S wears 1 / (1 - (S / Sc)^2) times as fast (Roering et al. " | ||
| 445 | "1999). Unset wears craters alike on any slope; no lunar value is published.", | ||
| 446 | 324222 | "", Above(0.0)); | |
| 447 | 324351 | io("max_wear_rate", slope.maxWearRate, | |
| 448 | "Fastest a slope makes craters wear, over level ground: a numerical cap as S nears Sc.", "", | ||
| 449 | 324351 | AtLeast(1.0)); | |
| 450 | 324297 | } | |
| 451 | |||
| 452 | 161690 | template <typename IO> void Fields(IO& io, CraterApplyOptions& apply) { | |
| 453 | 323818 | io("order", apply.order, | |
| 454 | "Order in which overlapping craters are applied; later craters overprint earlier ones."); | ||
| 455 | 162447 | FadePixelFields(io, apply.fade, | |
| 456 | "How craters too small to resolve fade out, by output samples (pixels) across " | ||
| 457 | "their diameter: absent up to the first count, whole from the second."); | ||
| 458 | 324511 | io("datum", apply.datum, | |
| 459 | "Reference surface each crater's interior is cut relative to, fitted to the ground beneath " | ||
| 460 | "it; none adds craters onto the terrain everywhere."); | ||
| 461 | 162348 | io("datum_fit_radii", apply.datumFitRadii, | |
| 462 | 162348 | "Radius of the footprint the datum is fitted over, in crater radii.", "", Above(0.0)); | |
| 463 | 162259 | io("interior_replacement", apply.interiorReplacement, | |
| 464 | "Share of the interior replaced by datum plus profile: 1 erases older relief " | ||
| 465 | "inside the crater for a clean cut, 0 keeps it on the floor and walls.", | ||
| 466 | 162259 | "", UnitInterval()); | |
| 467 | 162311 | io("blend", apply.blend, | |
| 468 | "Where and how a crater's replaced interior blends into the surrounding terrain."); | ||
| 469 | 162585 | io("replacement", apply.replacement, | |
| 470 | "How manual craters with replace set replace the terrain beneath them, whatever the " | ||
| 471 | "datum: in full to start_radii, blending out to end_radii, on a plane fitted on a ring " | ||
| 472 | "beyond."); | ||
| 473 | 162523 | io("irregularity", apply.irregularity, | |
| 474 | "Irregular, non-circular crater outlines: which craters have them and how their shapes " | ||
| 475 | "are drawn."); | ||
| 476 | 162579 | io("rim_smoothing", apply.rimSmoothing, | |
| 477 | "Rounded rims: each crater's profile smoothed across distance near its rim; off unless " | ||
| 478 | "sigma_radii is set."); | ||
| 479 | 162588 | io("noise", apply.noise, | |
| 480 | "Fractal noise over each crater's footprint and around its rim, keyed to the crater; off " | ||
| 481 | "unless an amplitude is set."); | ||
| 482 | 162468 | io("texture", apply.texture, | |
| 483 | "Gullies down fresh walls, textured ejecta and older relief buried under the ejecta; off " | ||
| 484 | "unless an amplitude or mantling is set."); | ||
| 485 | 162589 | io("slope", apply.slope, | |
| 486 | "Craters on sloping ground with floors offset downslope and rims lowered upslope; needs " | ||
| 487 | "the plane datum."); | ||
| 488 | 162550 | io("terraces", apply.terraces, | |
| 489 | "Slump terraces on the walls of craters from the onset diameter, softening as they wear."); | ||
| 490 | 162569 | io("peaks", apply.peaks, | |
| 491 | "Central peaks of complex craters built from massifs, lowering as the craters wear."); | ||
| 492 | 162562 | } | |
| 493 | |||
| 494 | 251 | template <typename IO> void Fields(IO& io, RayLayout& layout) { | |
| 495 | 251 | io("seed", layout.seed, | |
| 496 | "Seed of the rays' directions; layers with the same layout share the same rays."); | ||
| 497 | 251 | io("count", layout.count, | |
| 498 | "Number of rays of a crater, drawn per crater and rounded; from 0 to 64."); | ||
| 499 | 251 | io("width_deg", layout.widthDegrees, | |
| 500 | "Angle in degrees a ray spans 2 radii from the center, drawn per ray, within (0, 180)."); | ||
| 501 | 251 | } | |
| 502 | |||
| 503 | 147 | template <typename IO> void Fields(IO& io, SecondaryRays& rays) { | |
| 504 | 147 | io("enabled", rays.enabled, | |
| 505 | "Gathers secondaries into their primary's rays and clumps them along each ray, as radial " | ||
| 506 | "chains and clusters; off spreads them evenly."); | ||
| 507 | 147 | io("layout", rays.layout, | |
| 508 | "The rays; give a crater albedo layer's rays the same layout for bright rays over the " | ||
| 509 | "secondaries."); | ||
| 510 | 147 | io("share", rays.share, | |
| 511 | "Share of secondaries in rays; the rest stay spread evenly. Illustrative.", "", | ||
| 512 | 147 | UnitInterval()); | |
| 513 | 146 | io("min_half_angle_deg", rays.minHalfAngleDegrees, | |
| 514 | "Narrowest half width of a ray, in degrees, so rays widen with range beyond their width " | ||
| 515 | "near the primary. Illustrative.", | ||
| 516 | 146 | "deg", Inside(0.0, 90.0)); | |
| 517 | 145 | io("clustering", rays.clustering, | |
| 518 | "How strongly secondaries clump along a ray: 0 spreads them evenly along it, 1 puts them " | ||
| 519 | "only in clumps. Illustrative.", | ||
| 520 | 145 | "", UnitInterval()); | |
| 521 | 144 | io("cluster_spacing", rays.clusterSpacing, | |
| 522 | "Typical spacing of clumps along a ray, in natural log of range; smaller values give " | ||
| 523 | "shorter, more frequent clumps. Illustrative.", | ||
| 524 | 144 | "", Above(0.0)); | |
| 525 | 143 | } | |
| 526 | |||
| 527 | 143 | template <typename IO> void Fields(IO& io, SecondaryShapes& shapes) { | |
| 528 | 143 | io("elongated_share", shapes.elongatedShare, | |
| 529 | "Share of secondaries stretched along the line back to their primary; 0 keeps " | ||
| 530 | "them round.", | ||
| 531 | 143 | "", UnitInterval()); | |
| 532 | 142 | io("ellipticity", shapes.ellipticity, | |
| 533 | "Long over short axis of an elongated secondary near the primary, drawn per secondary; at " | ||
| 534 | "least 1, falling to 1 at the outer range."); | ||
| 535 | 142 | } | |
| 536 | |||
| 537 | 146 | template <typename IO> void Fields(IO& io, SecondaryCraterOptions& o) { | |
| 538 | 146 | io("seed", o.seed, | |
| 539 | "Seed the secondaries are drawn with; changing it gives a different field of the same " | ||
| 540 | "statistics."); | ||
| 541 | 146 | io("onset_count", o.onsetCount, | |
| 542 | "Secondaries at least count_fraction primary diameters across, in an area the size of the " | ||
| 543 | "primary at the onset range; the sources give sizes, not numbers.", | ||
| 544 | 146 | "", Above(0.0).Required()); | |
| 545 | 142 | io("count_fraction", o.countFraction, | |
| 546 | "Size, as a fraction of the primary's diameter, from which the onset count counts " | ||
| 547 | "secondaries.", | ||
| 548 | 142 | "", Above(0.0)); | |
| 549 | 141 | io("size_slope", o.sizeSlope, | |
| 550 | "Cumulative size slope of the secondaries, their number falling as d^-slope; higher values " | ||
| 551 | "give relatively more small secondaries.", | ||
| 552 | 141 | "", Above(0.0)); | |
| 553 | 139 | io("min_diameter_m", o.minDiameter, "Smallest secondary generated, in meters.", "m", | |
| 554 | 139 | Above(0.0)); | |
| 555 | 138 | OptionalBound(io, "max_diameter_m", o.maxDiameter, | |
| 556 | "Largest secondary generated, in meters; unset has no limit beyond Singer et " | ||
| 557 | "al.'s largest secondary at each range.", | ||
| 558 | 138 | "m", std::numeric_limits<double>::infinity(), Above(0.0)); | |
| 559 | 138 | io("outer_range", o.outerRange, | |
| 560 | "How far secondaries reach, in primary diameters from its center; unset uses the longest " | ||
| 561 | "typical ray of Elliott et al. (2018).", | ||
| 562 | 138 | "", Above(0.0)); | |
| 563 | 137 | SelectionKeys primaryKeys; | |
| 564 | 137 | primaryKeys.minDiameter = "min_primary_diameter_m"; | |
| 565 | 137 | primaryKeys.maxDiameter = "max_primary_diameter_m"; | |
| 566 | 136 | SelectionFields( | |
| 567 | 137 | io, o.selection, "primary craters that throw secondaries", | |
| 568 | "Lets manual primary craters throw secondaries too; otherwise only generated and " | ||
| 569 | "replacing ones do.", | ||
| 570 | primaryKeys); | ||
| 571 | 136 | io("cell_size_factor", o.cellSizeFactor, | |
| 572 | "Side of the polar cells secondaries are drawn in, as a multiple of each size band's " | ||
| 573 | "largest diameter.", | ||
| 574 | 136 | "", Above(0.0)); | |
| 575 | 135 | io("rays", o.rays, "Secondaries gathered into rays and clumped along them; off by default."); | |
| 576 | 131 | io("shapes", o.shapes, "Secondaries stretched toward their primary; round by default."); | |
| 577 | 130 | SourceResolvesField(io, o.sourceResolvesPixels, "secondaries", "diameter"); | |
| 578 | 128 | } | |
| 579 | |||
| 580 | 424 | template <typename IO> void Fields(IO& io, PowerLawDiffusivity& law) { | |
| 581 | 424 | io("coefficient", law.coefficient, | |
| 582 | "Diffusivity of a 1 km crater, in m^2/Myr; higher values wear craters down " | ||
| 583 | "faster.", | ||
| 584 | 424 | "m^2/Myr", Above(0.0)); | |
| 585 | 422 | io("exponent", law.exponent, | |
| 586 | "Exponent of the diameter in coefficient (D / 1 km)^exponent; 0 gives the same " | ||
| 587 | "diffusivity for every crater size."); | ||
| 588 | 421 | io("min_diameter_m", law.minDiameter, | |
| 589 | "Diameter in meters below which the diffusivity is held at its value at this diameter.", "m", | ||
| 590 | 421 | AtLeast(0.0)); | |
| 591 | 420 | } | |
| 592 | |||
| 593 | } // namespace terraingen | ||
| 594 |