Skip to content

Commit

Permalink
remove unused function has_intersection
Browse files Browse the repository at this point in the history
  • Loading branch information
videlec committed Aug 28, 2023
1 parent 0eac075 commit 753e49a
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions veerer/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,6 @@
RED: 'veeringred!20'}


def has_intersection(triangles, new_triangle, pos):
r"""
Check whether ``new_triangle`` intersects one of the triangles in ``triangles``
where the positions of the vertices have to be found in ``pos``.
"""
for t in triangles:
for i in range(3):
p1 = t[i]
p2 = t[(i + 1) % 3]
for j in range(3):
q1 = new_triangle[j]
q2 = new_triangle[(j + 1) % 3]

if (orientation(p1, p2, q1) != orientation(p1, p2, q2) and
orientation(q1, q2, p1) != orientation(q1, q2, p2)):
return True

return False


class FlatVeeringTriangulationLayout(object):
r"""
A flat triangulation layout in the plane.
Expand Down Expand Up @@ -1086,4 +1066,4 @@ def plot_orbit(self, p, n, slope=VERTICAL, **kwds):

G += line2d([p1 + x1 / L[i1] * V[i1], p2 + x2 / L[i2] * V[i2]], **kwds)

return G
return G

0 comments on commit 753e49a

Please sign in to comment.