I'm trying to test whether or not the origin is contained inside the
following triangle
inscribed inside a circle:
>>> th = array([ 2.3913423, 5.3133123, 1.8516171])
>>> p=patch.Polygon(array([cos(th),sin(th)]).T)
>>> p.contains_point((0,0))
returns 0
but,
>>> matplotlib.nxutils.points_insi
Le 13/02/2012 17:47, reckoner a écrit :
I'm trying to test whether or not the origin is contained inside the
following triangle
inscribed inside a circle:
> th = array([ 2.3913423, 5.3133123, 1.8516171])
> p=patch.Polygon(array([cos(th),sin(th)]).T)
What do you mean by "patch" here?
I tested
Here's a better example:
>>> th= array([ 4.65542641, 5.32920696, 2.20928291])
>>> p=patch.Polygon(array([cos(th),sin(th)]).T)
>>> print p.contains_point((0,0))
1
>>> print matplotlib.nxutils.pnpoly(0,0,p.get_path().vertices)
0
Thanks!
On 2/13/2012 8:47 AM, reckoner wrote:
> I'm trying to te
On Mon, Feb 13, 2012 at 1:33 PM, reckoner wrote:
> Here's a better example:
>
> >>> th= array([ 4.65542641, 5.32920696, 2.20928291])
> >>> p=patch.Polygon(array([cos(th),sin(th)]).T)
> >>> print p.contains_point((0,0))
> 1
> >>> print matplotlib.nxutils.pnpoly(0,0,p.get_path().vertices)
> 0
>
>
reckoner:
>>> th= array([ 4.65542641, 5.32920696, 2.20928291])
>>> p=patch.Polygon(array([cos(th),sin(th)]).T)
>>> print p.contains_point((0,0))
1
>>> print matplotlib.nxutils.pnpoly(0,0,p.get_path().vertices)
0
Thanks!
I can confirm this for both the current
On Mon, Feb 13, 2012 at 2:59 PM, Jerzy Karczmarczuk <
jerzy.karczmarc...@unicaen.fr> wrote:
>
> reckoner:
>
>
>>
>> >>> th= array([ 4.65542641, 5.32920696, 2.20928291])
>> >>> p=patch.Polygon(array([cos(th),sin(th)]).T)
>> >>> print p.contains_point((0,0))
>> 1
>> >>> print matplotlib.nxutils.p