# How to take a point randomly from a region [duplicate]

I want to take some points randomly by the limits above, I had try to use FindInstance method but it always out (0,0)  FindInstance[9 x + 7 y <= 56 && 7 x + 20 y <= 70, {x, y}, RandomSeeding -> Automatic]

## marked as duplicate by Michael E2, gwr, m_goldberg, Henrik Schumacher, Bill WattsJan 17 at 6:07

• Have you seen RandomPoint? – Michael E2 Jan 15 at 3:25
• I'm sorry that the question had been asked, I will be more careful next time – Facet Jan 15 at 4:35

You can use ImplicitRegion and RandomPoint:

SeedRandom[1]
RandomPoint[ImplicitRegion[9 x + 7 y <= 56 && 7 x + 20 y <= 70,
{{x, 5, Infinity}, {y, 0, Infinity}}], 10]


{{5.99903,0.202433},{5.13618,0.481529},{5.22954,0.613772},{5.08035,0.511267},{5.28252,0.815217},{5.48401,0.265592},{5.91503,0.0185986},{5.51682,0.497948},{6.19432,0.0188226},{5.25428,1.24232}}

Alternatively,

SeedRandom[1]
RandomPoint[ImplicitRegion[9 x + 7 y <= 56 && 7 x + 20 y <= 70 && x > 5 && y >= 0,
{x, y}], 10]


same result