terrain op• Data kinds: mesh → mesh
• Call: import fullseye as fs; fs.ledger.mesh_subdivide(V, F, *, levels: 'int' = 1, target_edge=None, max_faces: 'int' = 4000000) (implementation को सीधे call करना हो तो import render3d; render3d.mesh_subdivide(V, F, *, levels: 'int' = 1, target_edge=None, max_faces: 'int' = 4000000), registry से लेना हो तो ops3d.get("mesh_subdivide"))
triangle mesh को midpoint subdivision या adaptive tessellation से refine करता है → (V, F)।
या तो uniform midpoint subdivision (levels passes, हर बार ×4 faces) या target edge length तक adaptive tessellation (target_edge:
median edge = target, edge segments ≤ 1.5×target, face के भीतर Delaunay edges < 2×target)।
geometry *अपरिवर्तित* रहती है — हर नया vertex किसी पुराने facet पर होता है, इसलिए surface area और घिरा हुआ volume बिल्कुल सुरक्षित रहते हैं (tests इसे पक्का करते हैं) और कभी कुछ decimate नहीं होता; केवल facet का आकार बदलता है, ताकि बाद में mesh_displace_spectrum छोटी wavelengths को aliasing के बिना वहन कर सके।
adaptive mode हर edge को n = round(length / target_edge) (≥ 1) segments में काटता है — यह प्रति *edge* गिनती है, इसलिए पड़ोसियों के बीच conforming रहती है (कोई T-junction नहीं) — और हर face को face plane में target_edge अंतराल वाली hexagonal lattice से भरता है, जिसे प्रति face 2-D Delaunay (Qhull) से triangulate किया जाता है। इसलिए भीतरी edges *source face का shape चाहे जो हो* ≈ target_edge रहते हैं (Gaskell के Itokawa faces का सबसे लंबे/सबसे छोटे edge का median अनुपात 1.83 है, इसलिए प्रति face lattice pattern वह anisotropy विरासत में ले लेता; बार-बार midpoint bisection इसके अलावा factor 2 का फैलाव (target/2, target] छोड़ता है)। Itokawa model पर मापा गया (edge p5/median/p95 = 2.6/4.7/7.2 m, target 1.5 m): examples_3d/itokawa_regolith_hero.py देखें — test graded plane पर p95/p5 ≤ 1.5 पक्का करता है। max_faces (default MAX_SUBDIVIDE_FACES) memory guard है: यदि योजना इससे अधिक हो तो call चुपचाप कम refine करने के बजाय ValueError उठाता है (fail-closed)। deterministic। Fail-closed: degenerate mesh, levels < 0, non-positive target_edge / caps → ValueError।
2 modes हैं, जो target_edge दिए जाने या न दिए जाने से बदलते हैं।
• target_edge=None (uniform): सभी edges को midpoint पर बाँटने वाला subdivision levels बार दोहराया जाता है (face संख्या हर 1 बार में 4 गुना)। levels=0 input को जैसा का तैसा लौटाता है। हर बार से पहले यदि face_count×4 > max_faces हो तो ValueError।
• target_edge दिया हो (adaptive): हर edge के लिए segments की संख्या n = round(length / target_edge) (कम से कम 1) तय की जाती है और पड़ोसी faces के साथ साझा होती है, इसलिए T-junction नहीं बनते। segments की संख्या आंतरिक सीमा 64 पर चुपचाप clamp होती है, इसलिए target_edge के 64 गुना से लंबे edges target तक नहीं पहुँचते। यदि किसी edge को बाँटने की ज़रूरत न हो तो input की copy लौटाई जाती है। यदि face संख्या का अनुमान Σ(sum of the 3 edges' segment counts + mean segment count²) max_faces से अधिक हो तो गणना से पहले ValueError। इस mode में levels उपयोग नहीं होता।
return value (V (N',3) float64, F (M',3) int64)। नए vertices हमेशा मूल faces पर रखे जाते हैं, इसलिए area और volume नहीं बदलते (यह smoothing नहीं है)। adaptive mode प्रति face 2-D Delaunay (scipy Qhull) उपयोग करता है, इसलिए बहुत लंबे-पतले faces पर गुणवत्ता गिरती है। subdivide करने के बाद mesh_edge_lengths से edge length का वितरण जाँचें और फिर mesh_displace_spectrum को दें।
• 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 के स्रोत।
• itokawa_regolith_hero — py -3.11 examples_3d/itokawa_regolith_hero.py
mesh को input के रूप में लेते हैं)mesh_to_voxel · mesh_to_points · to_points · fuse_to_voxel · ambient_occlusion · cast_shadow · supersample_mesh · render_beauty
terrain)mesh_displace_fbm · terrain_region_mask · mesh_scatter_boulders · mesh_edge_lengths · 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.