terrain_region_mask — 3D terrain op

• Data kinds: mesh → signal

• Call: import fullseye as fs; fs.ledger.terrain_region_mask(V, F, *, smooth_fraction: 'float' = 0.3, method: 'str' = 'neck', seed: 'int' = 0) -> 'np.ndarray' (implementation को सीधे call करना हो तो import render3d; render3d.terrain_region_mask(V, F, *, smooth_fraction: 'float' = 0.3, method: 'str' = 'neck', seed: 'int' = 0) -> 'np.ndarray', registry से लेना हो तो ops3d.get("terrain_region_mask"))

उपयोग

हर face का terrain weight (M,) [0,1] में: 0 = smooth regolith "sea", 1 = खुरदुरा highland।

method='neck' (default, Itokawa से प्रेरित): sea, principal (लंबी) axis के साथ सबसे संकरे cross-section के चारों ओर faces की पट्टी है — MUSES-C Regio head और body के बीच की गर्दन में है — जिसे तब तक चौड़ा किया जाता है जब तक वह surface area के smooth_fraction को ढक न ले। method='noise': कम frequency वाले seeded fBm पर area-weighted smooth_fraction quantile से threshold (सामान्य patches)। method='slope': faces को local slope (face normal और smooth किए गए neighbourhood normal के बीच का कोण) से क्रम में रखा जाता है; area का सबसे सपाट smooth_fraction sea है। deterministic; गलत input पर fail-closed।

return value हर face के लिए float64 (M,) है, जिसके मान 0 या 1 के binary हैं (बीच के मान नहीं आते)। प्रक्रिया में हर method के लिए 1 score बनाया जाता है, सबसे छोटे score वाले faces से area जोड़ा जाता है, और कुल area के smooth_fraction तक पहुँचने तक के हिस्से को "sea" (0) बनाया जाता है।

• 'neck': face centroids के area-weighted principal axis (SVD का 1st component) के साथ, principal-axis coordinate के 20 से 80 % interval को 24 bins में बाँटा जाता है, जिस bin का radius 90 percentile सबसे छोटा है उसके केंद्र को "neck" माना जाता है, और neck plane से दूरी score होती है। 8 से कम faces वाले bins को छोड़ दिया जाता है। seed इस्तेमाल नहीं होता।

• 'noise': face centroids पर fbm_noise (wavelength = bounding-box diagonal / 3, 2 octaves, seed) score होता है।

• 'slope': face normal और "3 vertices के vertex normals के औसत" के बीच का कोण (radian) score होता है। seed इस्तेमाल नहीं होता।

smooth_fraction [0, 1] में होता है (range से बाहर या non-finite पर ValueError)। 0 पर तुरंत सभी faces 1, और 1 पर सभी faces 0 लौटाए जाते हैं। ऊपर के अलावा कोई method हो तो ValueError। मिले weights को mesh_scatter_boulders / sample_boulders के region_weights में देकर sea में boulders न रखने के लिए इस्तेमाल किया जाता है।

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• itokawa_regolith_hero — py -3.11 examples_3d/itokawa_regolith_hero.py

वे अगले ops जिनसे type जुड़ता है (signal को input के रूप में लेते हैं)

fuse_to_voxel

इसी category के (terrain)

mesh_displace_fbm · mesh_scatter_boulders · mesh_edge_lengths · mesh_subdivide · displacement_band_weights · mesh_displace_spectrum · bump_normals_fbm


*Provenance: render3d.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.