Intersection Of two curves
Project description
Intersection Of two curves in Pure numpy
Inspired from this matlab implementation, wrote this python implementation of how to detect intersection of two curves.
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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
intersect-1.2.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file intersect-1.2.tar.gz
.
File metadata
- Download URL: intersect-1.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94fea3f3740c8d25a5d578768be090897c407884a576ad4a17494bca6a10d7c5 |
|
MD5 | 8864c43faeff71cf059ccea0ff7dcabc |
|
BLAKE2b-256 | 5db46f8c5c5f8952773fc386bcc0483e166f329d30a54a179b224fec368f86b2 |
File details
Details for the file intersect-1.2-py3-none-any.whl
.
File metadata
- Download URL: intersect-1.2-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 100224450c273703c0921fd3fbe063b0685a607e866c2519d770eb7ac09e4159 |
|
MD5 | 033697472463e4f84e179f5656a9574f |
|
BLAKE2b-256 | 84aa4ef22729c73b9fec01df3b663e114eeb1faf5013e746ffb2390063a03544 |