How to kick out points that are specific to a function

Use RegionMember:

Pick[pnts, RegionMember[Disk[{0, 0}, 1]][pnts], False] // Short

{{-1.8,0.2},{-1.8,0.4},{-1.8,0.6},<<159>>,{2.,1.6},{2.,1.8},{2.,2.}}


Use Select which will give you a list of points which satisfy your condition

pnts={...};
Select[pnts, Norm[#]>=1&]

I would say the previous answers are better for your specific case of $x^2 + y^2 < 1$, but in the more general case I would use:

Select[pnts, #[[1]]^2 + #[[2]]^2 >= 1 &]

or

Select[pnts, !#[[1]]^2 + #[[2]]^2 < 1 &]

where #[[1]] means the first element and #[[2]] means the second element in each pair of numbers (your x and y). I find that this syntax allows me to construct fairly complex selection criteria.

The two definitions I gave are equivalent, it just depends on which syntax makes the most sense to you - either take the opposite sign (>= instead of <) to get elements that are greater than or equal to, or simply ask for those elements that are "not lesser than".

Tags:

Conditional