[Numpy-discussion] Stick intersection path algorithm
Chris Barker - NOAA Federal
chris.barker at noaa.gov
Sun Sep 1 20:18:04 EDT 2013
On Sun, Sep 1, 2013 at 3:55 PM, Josè Luis Mietta <
joseluismietta at yahoo.com.ar> wrote:
> Given two arbitrary sticks, i need a simple and effective algorithm that
> determinate if that two sticks are conected by a 'intersected-sticks' path.
>
>
do you mean a test to see if two line segments intersect?
This looks reasonable:
http://wiki.processing.org/w/Line-Line_intersection
It probably makes sense to translate to Cython (or use the C and call with
cython).
I"ve also got similar code in a little package of mine:
https://github.com/ChrisBarker-NOAA/py_geometry
Already Cython, and includes code to check a whole bunch at once, stored in
numpy arrays:
https://github.com/ChrisBarker-NOAA/py_geometry/blob/master/py_geometry/line_crossings.pyx
I hope it's useful to you.
-Chris
-Chris
-Chris
> Any idea for that?
>
> Thanks a lot!
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130901/5ea6fc62/attachment.html>
More information about the NumPy-Discussion
mailing list