tb_sphere_sdf — 2D typed op

• Data kinds: points → volume

• Call: fullseye.apply(img, "tb_sphere_sdf", a=0.5, b=0.5) (2-D model = एक image + दो scalar knobs a,b∈[0,1])

tb_sphere_sdf: input → output

*Figure synthetic 128×128 input पर सच में चलाकर मिला output है। बाईं ओर input, दाईं ओर output। Point clouds ऊपर से देखे गए scatter के रूप में (brightness = z), 1-D series line के रूप में, volumes z दिशा में maximum-intensity projection के रूप में, videos बीच के frame के रूप में, complex images amplitude के रूप में, और जो return values चित्र नहीं बन सकते वे स्वयं values के रूप में दिखाए जाते हैं।*

*Knob a output नहीं बदलता (मापा गया: 0.1 / 0.5 / 0.9 पर एक जैसा)।*

*Knob b output नहीं बदलता (मापा गया: 0.1 / 0.5 / 0.9 पर एक जैसा)।*

Stages (पहले आने वाले ops → यह op, बाएँ से क्रम में):

▸ tb_sphere_sdf: stages का figure (docs site)

दूसरी images पर भी (synthetic scene / photo / coins। ऊपर की row में inputs, नीचे की row में उनके outputs। Knobs default पर):

▸ tb_sphere_sdf: दूसरी images पर output (docs site)

Motion (GIF: frames / views / slices क्रम से। स्थिर figure ही पूरा रूप है, GIF सहायक है):

tb_sphere_sdf: animation

उपयोग

sphere का signed distance field: |p - center| - R (अंदर ऋणात्मक, बाहर धनात्मक)।

grid अंतिम axis 3 वाला coordinate array (..., 3) है (grid_coords का output या (N,3) point cloud)। center की लंबाई 3 है, R>=0 radius है। return value का shape grid.shape[:-1] है। exact SDF (gradient norm 1)। sdf_offset(sphere_sdf(g,c,R), r) == sphere_sdf(g,c,R+r)।

R < 0 या गलत आकार के grid / center पर ValueError raise होता है।

गणना: np.linalg.norm(grid - center, axis=-1) - R। coordinate की unit ही सीधे दूरी की unit बनती है (grid_coords के world coordinate देने पर world unit)। coordinate के component का क्रम grid की अंतिम axis का क्रम है (grid_coords में (x, y, z)), और center भी उसी क्रम में।

argument और validation (ValueError):

• grid: अंतिम axis 3 वाला float array (..., 3) (1-D (3,) भी चलता है; 0-D या अंतिम axis 3 न हो तो अस्वीकार)।

• center: 3 element (reshape(3) न हो सके तो numpy का ValueError)।

• R: float() हो सकने वाला scalar। rotation matrix आदि देने पर भी ValueError (यह argument radius है, pose नहीं)। R < 0 अस्वीकार, R = 0 centre से distance field ही है।

return value: grid.shape[:-1] का float64 (grid_coords के output पर (nx, ny, nz))। centre पर -R, surface पर 0, बाहर धनात्मक।

उपयोग: grid_coords से grid → sphere_sdf / box_sdf → sdf_union / sdf_subtract से CSG → <= 0 को occupied मानकर marching cubes (voxel_to_mesh को -sdf देकर iso=0 के बराबर isosurface)।

2-D evolution registry में bridge किया गया 3d का op sphere_sdf। implementation वही है; केवल calling convention को op(v, a, b) के अनुरूप किया गया है। इस op में कोई tunable parameter नहीं है; न a उपयोग होता है, न b।

संदर्भ (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 के स्रोत।

Studio में आज़माएँ

नीचे का program सच में चलता है, यह जाँचा गया है (figure वाला ही input)। Studio की help में यह block buttons बन जाता है, जिनसे इसे वहीं load करके चलाया जा सकता है।

img_to_points 0.50 0.50
tb_sphere_sdf 0.50 0.50

▸ यह pipeline load करें  ·  Load करके चलाएँ

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

नीचे के उदाहरण मूल ledger op sphere_sdf को call करते हैं। यह bridge op वही implementation है, बस fn(v, a, b) convention के अनुसार ढाला गया है, इसलिए व्यवहार वैसा ही लागू होता है (केवल call का रूप अलग है)।

• annotate3d_figure — py -3.11 examples_3d/annotate3d_figure.py

• gear_metrology — py -3.11 examples_3d/gear_metrology.py

• molecule_atom_count — py -3.11 examples_3d/molecule_atom_count.py

• procedural_hand — py -3.11 examples_3d/procedural_hand.py

• render_beauty — py -3.11 examples_3d/render_beauty.py

• sdf_csg — py -3.11 examples_3d/sdf_csg.py

• sfm_recon — py -3.11 examples_3d/sfm_recon.py

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

identity · vol_gaussian · vol_median · vol_erode · vol_dilate · vol_threshold · vol_reg_dilate · vol_reg_erode

इसी category के (typed)

tb_points_to_voxel · tb_estimate_point_normals · tb_iss_keypoints · tb_project_points · tb_render_point_depth · tb_statistical_outlier_removal · tb_radius_outlier_removal · tb_voxel_grid_downsample


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

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