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, i, j = intersection(x1, y1, x2, y2)
print(f"curves intersect at elements {i, j}, corresponding to coordinates {x,y}")
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file intersect-1.3.2.tar.gz.
File metadata
- Download URL: intersect-1.3.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c67ec5529bd231ddb46547221db52055250ff96278d8a939fc90962026964d2
|
|
| MD5 |
6a084e39c9441ce34457c2000a4179e2
|
|
| BLAKE2b-256 |
7b0fb709e4f574bbb73aff193eed03bde817592cc6c673a2f95dfdc8e9949ac6
|
Provenance
The following attestation bundles were made for intersect-1.3.2.tar.gz:
Publisher:
publish.yml on sukhbinder/intersection
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
intersect-1.3.2.tar.gz -
Subject digest:
9c67ec5529bd231ddb46547221db52055250ff96278d8a939fc90962026964d2 - Sigstore transparency entry: 203282347
- Sigstore integration time:
-
Permalink:
sukhbinder/intersection@73780578cb3a2a2c3e520e93bac593a93e139dd2 -
Branch / Tag:
refs/tags/v1.3.3 - Owner: https://github.com/sukhbinder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@73780578cb3a2a2c3e520e93bac593a93e139dd2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file intersect-1.3.2-py3-none-any.whl.
File metadata
- Download URL: intersect-1.3.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45705770f2060355ff99e34d7329c1bd7510d920f52284a4aea15606d8daebb3
|
|
| MD5 |
3a32f1ad3c819aff78f9ac093eede79c
|
|
| BLAKE2b-256 |
2d0b5ceb67103c2c7091491ea225d82f3b174d2aeb45da5f0f391703ffd83115
|
Provenance
The following attestation bundles were made for intersect-1.3.2-py3-none-any.whl:
Publisher:
publish.yml on sukhbinder/intersection
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
intersect-1.3.2-py3-none-any.whl -
Subject digest:
45705770f2060355ff99e34d7329c1bd7510d920f52284a4aea15606d8daebb3 - Sigstore transparency entry: 203282349
- Sigstore integration time:
-
Permalink:
sukhbinder/intersection@73780578cb3a2a2c3e520e93bac593a93e139dd2 -
Branch / Tag:
refs/tags/v1.3.3 - Owner: https://github.com/sukhbinder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@73780578cb3a2a2c3e520e93bac593a93e139dd2 -
Trigger Event:
release
-
Statement type: