# ShowPointClass.py """ Illustrate the class Point """ from ThePointClass import * from SimpleGraphics import * def ShowPoint(P,c): DrawDisk(P.x,P.y,.1,FillColor=c) def Midpoint(P1,P2): """ Returns a point that is the midpoint of a line segment that connects P1 and P2. PreC: P1 and P2 are points. """ xm = (P1.x+P2.x)/2.0 ym = (P1.y+P2.y)/2.0 Q = Point(xm,ym) return Q def RandomPoint(Lx,Rx,Ly,Ry): """ Returns a point that is randomly chosen randomly from the square Lx<=x<=Rx, Ly<=y<=Ry. PreC: L and R are floats with L