def getCenter(self): """Return the center of the material form.""" center=MaterialPoint.createFromform.center x,y=center position=Vector(x,y,color=mycolors.GREEN) point_motion=Motion() for point in self.points: point_motion+=point.getMotion() material_center=MaterialPoint(point_motion) material_center.setPosition(position) return material_center
def showMotion(self,surface): """Show the motion on a surface.""" form=self.getForm() center=form.center() x,y=center position=Vector(x,y,color=mycolors.GREEN) point_motion=Motion() for point in self.points: point_motion+=point.getMotion() material_center=MaterialPoint(point_motion) material_center.setPosition(position) material_center.showMotion(surface)