Re: How to select only points which are inside a domain

• To: mathgroup at smc.vnet.net
• Subject: [mg125045] Re: How to select only points which are inside a domain
• From: Dana DeLouis <dana01 at me.com>
• Date: Sun, 19 Feb 2012 06:32:11 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com

```> points which are inside a domain {xmin,xmax,  ymin,ymax,  zmin,zmax}?

Here's one of many ideas:

Pts =RandomInteger[{-9,9},{1000,3}];

x between -1,1,
y between -2,2,
z between 1,1

Your list of intervals:

rngs = {{-1,1},{-2,2},{-1,1}};

Select[Pts,Inner[IntervalMemberQ,Interval/@rngs,#,And]&]

{{1,0,-1},{-1,1,1},{1,2,-1},{-1,-1,1},{1,0,0}}

Then...

Point@@@%

{Point[1,0,-1],Point[-1,1,1],Point[1,2,-1],Point[-1,-1,1],Point[1,0,0]}

= = = = = = = = = = = =
HTH  :>)
Dana DeLouis
Mac, Math 8.0
= = = = = = = = = = = =

On Feb 15, 4: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

```

• Prev by Date: How to convert recurrence into generating function?
• Next by Date: NProbability
• Previous by thread: Re: How to select only points which are inside a domain
• Next by thread: Documentation for GridBoxSpacings