intersection() caliculates intersection between two line segments
Project description
i-sect
insertect(x0, y0, x1, y1, x2, y2, x3, y3) calucurate intersection between two line segments and return the coordinate of the intersection.
Four points: p1(x0, y0), p1(x1, y1), p3(x2, y2), p4(x3, y3)
Two line segments: segment1(p1, p2) and segment2(p3, p4)
return value: (x, y) or False
How to install
pip install i-sect
How to use
from i-sect import *
p = intersect(0, 0, 15, 0, 0, 5, 10, 5) # paralell
if p == False:
print('no intersection.')
else:
print(p[0], p[1])
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 Distributions
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 i4sect-0.0.3-py3-none-any.whl.
File metadata
- Download URL: i4sect-0.0.3-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7faedbf28c988ae0fc809cff667d7c6fb8ecd80b2d5c23fa22de4584c65db062
|
|
| MD5 |
4fd3caaefb5386aa291890fb6447d187
|
|
| BLAKE2b-256 |
ff759f46c66c1f5472308f9f2787f477e9ed294eb9ba71c849b729f5e1577a32
|