'Project the point `a` onto the line between the origin
and point `b` along the normal direction.
Parameters
a : Point
b : Point
Returns
p : Point
See Also
sympy.geometry.line.LinearEntity.projection
Examples
>>> from sympy.geometry import Line, Point
>>> a = Point(1, 2)
>>> b = Point(2, 5)
>>> z = a.origin
>>> p = Point.project(a, b)
>>> Line(p, a).is_perpendicular(Line(p, b))
True
>>> Point.is_collinear(z, p, b)
True'

@staticmethod
def project(a, b):

    (a, b) = Point._normalize_dimension(Point(a), Point(b))
    if b.is_zero:
        raise ValueError('Cannot    project    to    the    zero    vector.')
    return (b * (a.dot(b) / b.dot(b)))
