WLJS LogoWLJS Notebook

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 [xmin, xmax] × ....

Examples

Random point in disk:

RandomPoint[Disk[]]

Multiple points:

RandomPoint[Disk[], 10]

In 3D region:

RandomPoint[Ball[], 100]

Please visit the official Wolfram Language Reference for more details.

On this page