line_from_2points — 3D geometry op

数据种类:pointsprimitive

调用: import fullseye as fs; fs.ledger.line_from_2points(a, b)(要直接调用实现,import match3d; match3d.line_from_2points(a, b);从台账取用则 ops3d.get("line_from_2points"))

用法

两点 → 直线(通过点, 单位方向)。两个坐标即可确定直线(2D/3D 通用)。

> 以下的详细说明为原文 —— 摘要与标题已翻译。

返り値 `(a, u): a は入力の 1 点目(float 配列)、u = (b − a)/|b − a|`。引数は数値の

2 または 3 ベクトル(それ以外・次元の混在は ValueError)。`a == b` のときは方向が零ベクトルの

まま返る(例外は出ない。呼び手で `|u| > 0` を確かめる)。座標の並び順は問わない(入力の

順のまま返る)ので、(x,y,z) でも (z,y,x) でも一貫していればよい。

後段: `distance_point_line / distance_line_line / intersect_line_plane` /

`angle_between_lines にこの (a, u) を渡す。点群から直線を取るなら fit_line_3d`。

参考(示例数据・文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

可运行的示例(实际调用该算子并已验证的样例)

geometry_metrologypy -3.11 examples_3d/geometry_metrology.py

类型可衔接的下一个算子(可接受 primitive 作为输入)

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)

plane_from_3points · angle_3points · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line


*Provenance: match3d.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

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