Mathematica Asked on July 17, 2021
If we have two domains, it is possible to check whether one domain is inside another domain:
domain1 = Rectangle[{-2.5, -2.5}, {2.5, 2.5}];
domain2[R_] := Disk[{0, 0}, R]
condition[R_] := Boole @ RegionWithin[domain1, domain2[R]]
Now, let us consider a point
point[x_,y_] = {x,y}
Is it possible to check whether the point belongs to the region using something like RegionWithin (like PointWithin (?))?
Try
RegionMember[domain1, {1, 1}]
(*True*)
Correct answer by Ulrich Neumann on July 17, 2021
For a point, we can also use RegionWithin
since we can consider the region Disk[{x0,y0},0]
domain1 = Rectangle[{-2.5, -2.5}, {2.5, 2.5}];
RegionWithin[domain1, Disk[{1, 1}, 0]]
True
Answered by cvgmt on July 17, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP