openscad - 将形状与由两点定义的路径对齐

openscad - align a shape with a path defined by two points

我有一个功能:

function knotAng(a,s) =
    [(sin(a)+(2*sin(2*a)))*s,
     (cos(a)-(2*cos(2*a)))*s,
     sin(3*a)*s];

我在 a=0 到 359 且 s 为常量的路径上放置了一些对象

我想调整对象的方向,使它们遵循 knotAng(a-step,s) 和 knotAng(a,s)

描述的路径

提示与技巧页面,“Drawing "lines" in OpenSCAD' of the user manual shows how to rotate "lines" in 3D space by calculating the minimal rotation matrix as described in section 'Minimum rotation problem”部分。