Create Random Points randomly places a specified number of points within an extent window or inside the features of a polygon, line, or point feature class.
The first step of processing is to create a random number stream from a random number generator and seed. When generating random points within a specified extent, a random value on the x-axis and another on the y-axis of the extent are identified, which become the x- and y- coordinates for a point. To randomly select the point on the x-axis, the next unused value on the random number stream is selected and transformed into a Uniform distribution with a minimum and maximum being the minimum and maximum for the x extent. The same is done for the y-axis. The two values identify the first random point. This process is repeated until the specified number of points is reached.
To randomly place the specified number of points in each polygon, the polygons are partitioned by triangles of varying sizes using a standard polygon partitioning algorithm. The entire area of each polygon is filled by the triangles. To place the first point in the first polygon, one of the triangles in the overall polygon is randomly selected. The probability of selecting a particular triangle is influenced by the size of the triangle. The larger the triangle, the higher the probability the triangle will be selected. Two legs of the triangle become the two axes from which to place the random point. As is the case with the extent option, the next unused value is taken from the random stream, transformed into the Uniform distribution using the start of the triangle axis as the minimum and the end of the leg as the maximum. A value is randomly selected on the axis. The same is done for the other axis or leg of the triangle. These two random values are used to place a point. The point will fall within a parallelogram created by the two axes of the triangle. If the point falls within the third leg defining the triangle, the point is selected. If the point falls outside the triangle, it will fall into the other half of the parallelogram. Since this half of the parallelogram is a mirror image of the defining triangle (mirrored on the third leg), the point is mirrored back into the defining triangle. This process is repeated until the specified number of points is placed in the polygon and repeated for each polygon.