MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: point in convex hull

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55487] Re: [mg55477] Re: point in convex hull
  • From: DrBob <drbob at bigfoot.com>
  • Date: Sat, 26 Mar 2005 02:39:19 -0500 (EST)
  • References: <d1tvc0$rli$1@smc.vnet.net> <200503251048.FAA11334@smc.vnet.net>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

If w is one of the points in ch, ConvexHull throws a message, so I'd suggest this:

inside[w_, ch_] := MemberQ[ch, w] || !
    MemberQ[ConvexHull@Append[ch, w], 1 + Length@ch]

Bobby

On Fri, 25 Mar 2005 05:48:18 -0500 (EST), Carl K. Woll <carlw at u.washington.edu> wrote:

> "steve fisk" <fisk at bowdoin.edu> wrote in message
> news:d1tvc0$rli$1 at smc.vnet.net...
>> If pts is a set of points, and w is a point I can use ConvexHull[pts] to
>> find the convex hull of the points in pts. Is there a function to
>> determine if w lies in the convex hull?
>>
>
> Steve,
>
> Why don't you find out if the ConvexHull of w added to the old ConvexHull
> includes the point w. Something like
>
> Needs["DiscreteMath`"]
>
> pts=Table[{Random[],Random[]},{1000}];
> ch=pts[[ConvexHull[pts]]];
>
> inside[w_, ch_] := ! MemberQ[ConvexHull[Join[ch, {w}]], Length[ch] + 1]
>
> Carl Woll
>
>
>
>
>
>



-- 
DrBob at bigfoot.com


  • Prev by Date: Re: how to solve integral equation
  • Next by Date: Re: MD5 Brain teaser
  • Previous by thread: Re: point in convex hull
  • Next by thread: Re: point in convex hull