System

RandomPoint

RandomPoint[reg]

gives a pseudorandom point uniformly distributed in the region reg.

RandomPoint[reg,n]

gives a list of n pseudorandom points uniformly distributed in the region reg.

RandomPoint[reg,{n1,n2,}]

gives an n1× n2× array of pseudorandom points.

RandomPoint[reg,,{{xmin,xmax},}]

restricts to the bounds .

Details and Options

Examples

open allclose all

Basic Examples  (3)

Generate a list of points in a unit disk:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Generate multiple lists of points on a unit circle:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Generate a list of points in a standard cylinder:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Scope  (22)

Applications  (24)

Properties & Relations  (6)

See Also

RegionMember  RegionQ  ConstantRegionQ  RandomVariate  FindInstance  RegionDistance  SpherePoints

Introduced in 2015
(10.2)