Run the code to draw a random line joining 4 points. Try numbers of points other than 4—for example, 3:
This draws a line through the points at coordinates {0,0}, {1,1}, and {2,0}:
Out[1]= | |
You can turn on axes with AxesTrue in order to see the numeric coordinate positions:
Out[2]= | |
Use RandomReal to draw a line with random coordinates.
This gives a random number between 0 and 1. Each time you run the code, you get a different number:
Out[3]= | |
This gives a pair of numbers between 0 and 1. Each time you run the code, you get a different pair:
Out[4]= | |
This gives four pairs of random numbers:
Out[5]= | |
Use that code to draw a line with random coordinates:
Out[6]= | |
Specify Thick to draw a thicker random line:
Out[7]= | |