[Numpy-discussion] Stick intersection path algorithm

Josè Luis Mietta joseluismietta at yahoo.com.ar
Sun Sep 1 20:50:04 EDT 2013

Hi Chris.

I wanna see if two line segments are connected by a path formed by line segments intersected.

Waiting for your answers.

Thanks a lot!

De: Chris Barker - NOAA Federal <chris.barker at noaa.gov>
Para: Discussion of Numerical Python <numpy-discussion at scipy.org> 
Enviado: domingo, 1 de septiembre de 2013 21:18
Asunto: Re: [Numpy-discussion] Stick intersection path algorithm

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:


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:


Already Cython, and includes code to check a whole bunch at once, stored in numpy arrays:


I hope it's useful to you.




Any idea for that?
>Thanks a lot!
>NumPy-Discussion mailing list
>NumPy-Discussion at scipy.org


Christopher Barker, Ph.D.

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 
NumPy-Discussion mailing list
NumPy-Discussion at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20130901/1f4c8c78/attachment.html>

More information about the NumPy-Discussion mailing list