The function midpoint will compute the midpoint of the line segment defined by the two points p1 and p2. The points should be either lists of length 2, or expressions. In the latter case, the midpoint of the two expressions is just their average.

•

If one argument is a point and the other is a name, then the name is treated as an unevaluated point.

•

The command with(student,midpoint) allows the use of the abbreviated form of this command.