def equation(self, x='x', y='y', z='z', k='k'):
        x, y, z, k = _symbol(x), _symbol(y), _symbol(z), _symbol(k)
        p1, p2 = self.points
        a = p1.direction_ratio(p2)
        return (((x - p1.x)/a[0]), ((y - p1.y)/a[1]),
                ((z - p1.z)/a[2]), k)
The equation of the line in 3D
dataset/ETHPy150Open sympy/sympy/sympy/geometry/line3d.py/Line3D.equation