geometry op• Data kinds: points → primitive
• Call: import fullseye as fs; fs.ledger.fit_line_3d(points) (to call the implementation directly, import match3d; match3d.fit_line_3d(points); from the registry, ops3d.get("fit_line_3d"))
Point set → a least-squares line (through the centroid, direction = the largest principal axis). Returns (point, direction).
Returns the centroid c of an (N,3) point cloud (ValueError unless numeric with 3 columns; fewer than 2 points also ValueError) and the eigenvector of the largest eigenvalue of the scatter matrix (P−c)ᵀ(P−c) (the line minimising the sum of squared orthogonal distances; not a z=f(x) regression). direction is a unit vector with an arbitrary sign (depends on eigh; to unify the orientation, flip by the sign of (P[-1] − P[0]) @ direction). With only 2 points it is the line through the 2 points. If the points spread over a plane, the largest axis is merely "the longest direction" and not necessarily a line (no residual is returned, so check with distance_point_line). Sensitive to outliers (for robustness use ransac_line). 3-D only (2-D points raise ValueError).
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• geometry_metrology — py -3.11 examples_3d/geometry_metrology.py
primitive as input)fuse_to_voxel · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line · distance_segment_segment
geometry)line_from_2points · plane_from_3points · angle_3points · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line
*Provenance: match3d.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.