Question: as the title,this problem have confused me a whole day.If I have a region,how can I yield a random member in this region.The region such as `Triangle[{{0, 0}, {1, 2}, {2, 1}}]`or `(x>5&&x<9)||(x>11&&x<13)`

i want get a random member in the expected region.but the “FindInstance” will give me a same result in the scond time when i run it again.

my current solution is previously product some random member,then sift that expected that.but the way will result in a long time,because it has yield amounts of member that it don't meet the requestion.

Answer: 
You can also use the function `Graphics`Mesh`GenerateUniformPointsInTriangle`

```
gupiTriF = Graphics`Mesh`GenerateUniformPointsInTriangle;

Graphics[{Polygon[{{0, 0}, {0, 1}, {1, 0}}], White, Point[gupiTriF@500]}]

```

![Mathematica graphics](https://i.stack.imgur.com/seI96.png)

For an arbitrary triangle `tri` you can use `FindGeometricTransform` to map the random points in the unit right triangle to points in `tri`:

```
fgt2DF = FindGeometricTransform[#, {{0, 0}, {1, 0}, {0, 1}}][[2]] &;

SeedRandom[1]
Row[Table[coords = RandomReal[{0, 5}, {3, 2}];
  Graphics[{Hue[RandomReal[]], Polygon@coords, 
      RGBColor[RandomReal[1, {3}]], Point[fgt2DF[coords]/@
         gupiTriF[RandomInteger[{100, 500}]]]}, 
      ImageSize -> 200], {5}]]

```

![enter image description here](https://i.stack.imgur.com/JuDyO.png)

Similarly, in 3D, `Graphics`Mesh`GenerateUniformPointsInTetrahedron` does what its name says:

```
gupiTetF = Graphics`Mesh`GenerateUniformPointsInTetrahedron;
Graphics3D[{Opacity[.5], EdgeForm[], 
  Tetrahedron[{{0, 0, 0}, {1, 0, 0}, {0, 0, 1}, {0, 1, 0}}], Red,
  Point[gupiTetF@1000]}]

```

![Mathematica graphics](https://i.stack.imgur.com/m7CwC.png)

For a random tetrahedron, you can use a geometric transformation similar to the 2D case:

```
fgt3DF = FindGeometricTransform[#, {{0, 0, 0}, {1, 0, 0}, {0, 0, 1}, {0, 1, 0}}][[2]]&;

SeedRandom[111]
Row[Table[coords = RandomReal[{5, 10}, {4, 3}];
  Graphics3D[{Hue[RandomReal[]], FaceForm[Opacity[.25]], 
    Tetrahedron@coords, RGBColor[RandomReal[1, {3}]],
    Point[fgt3DF[coords] /@ gupiTetF[RandomInteger[{100, 500}]]]}, 
   ImageSize -> 300, Boxed -> False], {3}]]

```

![enter image description here](https://i.stack.imgur.com/VlKUm.png)
The general 2D case was discussed in [this question](https://mathematica.stackexchange.com/q/57938/3066), but a more robust version can be written

```
randomFromRegion2D[
    region_ /; RegionDimension[region] == 2, 
    trials_Integer /: trials > 0] :=
  Module[{bounds, randPts},
    bounds = RegionBounds @ region;
    randPts = 
      Transpose @ 
        {RandomReal[bounds[[1]], trials], RandomReal[bounds[[2]], trials]};
    Select[randPts, RegionMember[region]]]

tri = Triangle[{{0, 0}, {1, 2}, {2, 1}}];
SeedRandom[1]; 
Graphics[{{GrayLevel[.75], tri}, Point @ randomFromRegion2D[tri, 1000]}]

```

![triangle](https://i.stack.imgur.com/DtVIY.png)

However, the OP also asked about 1D regions such a one characterized by 

```
(x > 5 && x < 9) || (x > 11 && x < 13)

```

I would like to discuss how handle such regions, which must be dealt with a little differently than 2D regions because the functions supporting regions in *Mathematica* insist that points in 1D regions be represented by a list containing a single numeric object. Thus, the 1D origin is `{0.}`.

The OP's 1D specification can be made into a *Mathematica* region by taking the union of two `Interval` objects.

```
rx = RegionUnion[Interval[{5, 9}], Interval[{11, 13}]]]

randomFromRegion1D[
    region_ /; RegionDimension[region] == 1, 
    trials_Integer /: trials > 0] :=
  Module[{bounds, randPts},
    bounds = RegionBounds @ region;
    randPts = RandomReal[bounds[[1]], {trials, 1}];
    Select[randPts, RegionMember[region]] // Flatten]

SeedRandom[1]; 
NumberLinePlot[randomFromRegion1D[rx, 50],
  Prolog -> {GrayLevel[.75], AbsoluteThickness[10], 
    Line[Transpose @ {rx[[1, 1]], {0, 0}}], 
    Line[Transpose @ {rx[[2, 1]], {0, 0}}]}]

```

![intervals](https://i.stack.imgur.com/aWOio.png)