Angus originally suggest matplotlib. The other proposed solutions are 
overkill, unless it turns out that performance is a problem

Thanks
Mathew

Pierre GM wrote:
> Mathew,
> Have you tried the solution that was suggested by Angus yesterday on the 
> numpy 
> mailing list ?
>
> http://projects.scipy.org/pipermail/scipy-user/2008-February/015418.html
>
>   
>>>> import numpy as np
>>>> import matplotlib.nxutils as nxutils
>>>> polygon=np.array([(0,0),(0,1),(1,1),(1,0)])
>>>> points = np.array([(0.5,0.5),(0.4,1.5)])
>>>> nxutils.points_inside_poly(points, polygon)
>>>>         
> array([1, 0], dtype=int32)
>
> Meaning that the first point is, the second is not.
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>   



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to