segment_intersection_2d
Calculate the intersection point of line segments in a two-dimensional plane.
Install
pip install segment_intersection_2d
Usage
from segment_intersection_2d import segment_intersection_2d
line_1_p_1 = (0, 0)
line_1_p_2 = (1, 1)
line_2_p_1 = (1, 0)
line_2_p_2 = (0, 1)
crs = segment_intersection_2d(line_1_p_1, line_1_p_2, line_2_p_1, line_2_p_2)
print(crs) # (0.5, 0.5)
line_1_p_1 = (0, 1)
line_1_p_2 = (0, 0)
line_2_p_1 = (1, 1)
line_2_p_2 = (1, 0)
crs = segment_intersection_2d(line_1_p_1, line_1_p_2, line_2_p_1, line_2_p_2)
print(crs) # None
Metadata
Release files for segment-intersection-2d 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| segment_intersection_2d-0.1.0.tar.gz | 1.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| segment_intersection_2d-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.7 kB
Release files / segment_intersection_2d-0.1.0.tar.gz
| Download URL | segment_intersection_2d-0.1.0.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
106bc8908148d54ed4889038549cd81f11abc651e5ef30c9fad0a4e3c0285b1d
|
|
BLAKE2b-256 checksum How to use checksums |
1f0e442303158fa805ebe0cc42d9448bab3514af671da4df3e0ca096535a14e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.11.15 Windows/10
|
Release files / segment_intersection_2d-0.1.0-py3-none-any.whl
| Download URL | segment_intersection_2d-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e158a587f7bb4ea63ec1e12b09e442a042593909e26575acafefcd82d651b73
|
|
BLAKE2b-256 checksum How to use checksums |
fdd3ace2d761f76dadf2eb435483c23399c9086d7ef25d88bb4806f4907e1eb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.11.15 Windows/10
|