Friday, October 10, 2025
HomeLanguagesPython | Sympy Line.are_concurrent method

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:
 True:  if the set of linear entities intersect in one point
 False: otherwise.

Example #1:




# import sympy and Point, Line
from sympy import Point, Line
  
p1, p2 = Point(0, 0), Point(3, 5)
p3, p4 = Point(-2, -2), Point(0, 2)
  
l1, l2, l3 = Line(p1, p2), Line(p1, p3), Line(p1, p4)
  
# using are_concurrent() method
areConcurrent = Line.are_concurrent(l1, l2, l3)
  
print(areConcurrent)


Output:

True

Example #2:




# import sympy and Point, Line
from sympy import Point, Line
  
p1, p2 = Point(0, 0), Point(3, 5)
p3, p4 = Point(-2, -2), Point(0, 2)
  
l1, l2, l3 = Line(p1, p3), Line(p1, p4), Line(p2, p3)
  
# using are_concurrent() method
areConcurrent = Line.are_concurrent(l1, l2, l3)
  
print(areConcurrent)


Output:

False
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32349 POSTS0 COMMENTS
Milvus
87 POSTS0 COMMENTS
Nango Kala
6715 POSTS0 COMMENTS
Nicole Veronica
11878 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11941 POSTS0 COMMENTS
Shaida Kate Naidoo
6837 POSTS0 COMMENTS
Ted Musemwa
7097 POSTS0 COMMENTS
Thapelo Manthata
6792 POSTS0 COMMENTS
Umr Jansen
6791 POSTS0 COMMENTS