Intersection Save

Intersection of curves in python

Project README

Intersection Of two curves in Pure numpy

Inspired from this matlab implementation, wrote this python implementation of how to detect intersection of two curves.

image

Example usage

from intersect import intersection

a, b = 1, 2
phi = np.linspace(3, 10, 100)
x1 = a*phi - b*np.sin(phi)
y1 = a - b*np.cos(phi)

x2 = phi
y2 = np.sin(phi)+2
x, y = intersection(x1, y1, x2, y2)

plt.plot(x1, y1, c="r")
plt.plot(x2, y2, c="g")
plt.plot(x, y, "*k")
plt.show()


Install

To install


pip install intersect

Open Source Agenda is not affiliated with "Intersection" Project. README Source: sukhbinder/intersection
Stars
83
Open Issues
0
Last Commit
3 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating