Python | Sympy Line.intersection() method Last Updated : 28 Apr, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report In Sympy, the function intersection() is used to find the intersection with another geometrical entity. Syntax: Line.intersection(o) Parameters: o: Point or LinearEntity Returns: intersection: list of geometrical entities Example #1: Python3 1== # import sympy and Point, Line from sympy import Point, Line p1, p2, p3 = Point(0, 0), Point(1, 1), Point(7, 7) l1 = Line(p1, p2) # using intersection() method showIntersection = l1.intersection(p3) print(showIntersection) Output: [Point2D(7, 7)] Example #2: Python3 1== # import sympy and Point, Line, Segment from sympy import Point, Line, Segment p1, p2, p3, p4 = Point(0, 0), Point(1, 1), Point(0, 5), Point(2, 6) l1 = Line(p1, p2) s1 = Segment(p3, p4) # using intersection() method showIntersection = l1.intersection(s1) print(showIntersection) Output: [] Comment More infoAdvertise with us Next Article Python | Sympy Line.intersection() method R ravikishor Follow Improve Article Tags : Python SymPy Python SymPy-Geometry Practice Tags : python Similar Reads Python | sympy.Interval().intersect() method With the help of sympy.Interval().intersect() method, we can get the intersection of two sets by using sympy.Interval().intersect() method. Syntax : sympy.Interval(x, y).intersect(Interval(x, y)) Return : Return the intersection of two sets. Example #1 : In this example we can see that by using symp 1 min read Python â Sympy Polygon.intersection() Method In Sympy, the function Polygon.intersection() is used to get the intersection of a given polygon and the given geometry entity. The geometry entity can be a point, line, polygon, or other geometric figures. The intersection may be empty if the polygon and the given geometry entity are not intersecte 2 min read Python | Sympy Line.distance() method In Sympy, the function distance() is used to find the shortest distance between a given line and a given point. Syntax: Line.distance(other) Parameter: other: a point Returns: shortest distance between a line and a point Raises: NotImplementedError is raised if `other` is not a Point Example #1: Pyt 1 min read Python | Sympy Line.angle_between method In Sympy, the function angle_between() is used to return the non-reflex angle formed by rays emanating from the origin with directions the same as the direction vectors of the linear entities. Syntax: Line.angle_between(l2) Parameters: l1: LinearEntity l2: LinearEntity Returns: angle: angle in radia 1 min read Python | Sympy Line.are_concurrent method In Sympy, the function are_concurrent() is used to check whether the given linear entities(lines) are concurrent or not. Two or more linear entities are concurrent if they all intersect at a single point. Syntax: Line.are_concurrent(lines) Parameters: lines: a sequence of linear entities. Returns: T 1 min read Like