Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: point in convex hull

  • To: mathgroup at
  • Subject: [mg55508] Re: point in convex hull
  • From: wouter meeussen <wouter.meeussen at>
  • Date: Sun, 27 Mar 2005 02:42:40 -0500 (EST)
  • References: <d1tvc0$rli$>
  • Sender: owner-wri-mathgroup at

Close Ray,
works for anti-clockwise orientation, not for clockwise.

h = pts[[ConvexHull[pts]]];

ins[w_List,ch:{__List}] := Block[{w3=PadRight[w,3],ch3=PadRight[#,3]&/@ ch},
   SameQ @@ Sign[Last/@ (Cross @@@ Partition[((#-w3)&/@ ch3),2,1,1])]]

Check: say h = {{0,0}, {0,10}, {10,10}, {10,0}}

Table[{k,ins[{k,3},h], ins[{k,3},Reverse[h]]},{k,-5,15}]



  • Prev by Date: Questions about Abs[_]
  • Next by Date: Re: numerical solutions to two non algebraic equations.
  • Previous by thread: Re: point in convex hull
  • Next by thread: Re: point in convex hull