Run the code to draw 100 random circles in a size 10 region. Try a different number of circles:
This draws a circle at coordinate {5,5}. PlotRange specifies the size of the drawing area:
Graphics[Circle[{5, 5}], PlotRange -> {{0, 10}, {0, 10}}]
Use RandomReal to draw circles at random positions.
This gives a random number between 0 and 10. Each time you run the code, you get a different number:
RandomReal[10]
This gives a list of two random numbers:
RandomReal[10, 2]
This draws a circle at a random position. Each time you run the code, the circle is drawn in a different place:
Graphics[Circle[RandomReal[10, 2]], PlotRange -> {{0, 10}, {0, 10}}]
Use Table to draw lots of circles. Table makes lists of things.
This gives a list of 10 random coordinate positions:
Table[RandomReal[10, 2], {10}]
This draws 10 circles in random coordinate positions:
Graphics[Table[Circle[RandomReal[10, 2]], {10}],
PlotRange -> {{0, 10}, {0, 10}}]
If you don’t specify a PlotRange, the output will be just large enough to contain all the circles:
Graphics[Table[Circle[RandomReal[10, 2]], {10}]]
Graphics[Table[Circle[RandomReal[10, 2]], {100}]]