Re: How to select only points which are inside a domain
- To: mathgroup at smc.vnet.net
- Subject: [mg124992] Re: How to select only points which are inside a domain
- From: Ray Koopman <koopman at sfu.ca>
- Date: Thu, 16 Feb 2012 03:29:10 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201202091034.FAA18221@smc.vnet.net> <201202101057.FAA00780@smc.vnet.net>
On Feb 15, 1:42 am, Ted Sariyski <tsari... at craft-tech.com> wrote: > Hi, > I have a list of points: pntL={Point[x1,y1,z1],...}. How to select > only points which are inside a domain {xmin,xmax,ymin,ymax,zmin,zmax}? > Thanks in advance, > --Ted pts = Point /@ RandomReal[1,{10,3}] {Point[{0.954633, 0.471902, 0.0731487}], Point[{0.967115, 0.448343, 0.138532}], Point[{0.0689816, 0.621088, 0.957534}], Point[{0.47981, 0.681518, 0.351431}], Point[{0.412179, 0.221469, 0.743002}], Point[{0.699619, 0.272222, 0.84906}], Point[{0.950494, 0.842014, 0.113386}], Point[{0.0584834, 0.645106, 0.983113}], Point[{0.198335, 0.21592, 0.681302}], Point[{0.820813, 0.789445, 0.698693}]} dom = Interval /@ Sort /@ RandomReal[1,{3,2}] {Interval[{0.361566, 0.708194}], Interval[{0.138505, 0.759585}], Interval[{0.348656, 0.791273}]} Select[pts, Inner[IntervalMemberQ, dom, Sequence@@#, And]& ] {Point[{0.47981, 0.681518, 0.351431}], Point[{0.412179, 0.221469, 0.743002}]}
- References:
- ListInterpolate and missing values
- From: Mark Coleman <markspcoleman@gmail.com>
- Re: ListInterpolate and missing values
- From: Bob Hanlon <hanlonr357@gmail.com>
- ListInterpolate and missing values