Calculate the intersection point of line segments in a two-dimensional plane.
Project description
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
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
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 segment_intersection_2d-0.1.0.tar.gz.
File metadata
- Download URL: segment_intersection_2d-0.1.0.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
106bc8908148d54ed4889038549cd81f11abc651e5ef30c9fad0a4e3c0285b1d
|
|
| MD5 |
6738d87bb46174fe95f44e07751f494b
|
|
| BLAKE2b-256 |
1f0e442303158fa805ebe0cc42d9448bab3514af671da4df3e0ca096535a14e2
|
File details
Details for the file segment_intersection_2d-0.1.0-py3-none-any.whl.
File metadata
- Download URL: segment_intersection_2d-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e158a587f7bb4ea63ec1e12b09e442a042593909e26575acafefcd82d651b73
|
|
| MD5 |
bcc734b0fde5793918139a1db6debeb6
|
|
| BLAKE2b-256 |
fdd3ace2d761f76dadf2eb435483c23399c9086d7ef25d88bb4806f4907e1eb6
|