Previous Up Next

26.5.4  Defining random points in the plane

The point2d command defines a random point whose coordinates are integers between −5 and 5.

Examples

Assign A to a random point (once assigned, the point is fixed):

point2d(A)

Generate three random points and uses them to create a triangle:

point2d(A,B,C); triangle(A,B,C)

In other words, this generates a random triangle.


Previous Up Next