# This program draws two objects: a rectangle, a circle, with their reference # points. Then it scales the objects. from cs1graphics import * import time def main(): paper=Canvas(600,700,(218,240,248),"Rotation different objects") # creating a rectangle r=Rectangle(100,200,Point(300,350)) r.setFillColor('Red') r_ref_point=Circle(1,Point(300,350)) # creating a circle c=Circle(80,Point(130,250)) c.setFillColor('Blue') c.adjustReference(50,10) # moving reference point c_ref_point=Circle(1,Point(130+50,250+10)) c_ref_point.setDepth(10) # adding all objects to the canvas, i.e. drawing them paper.add(r), paper.add(c) #adding all objects' reference points paper.add(r_ref_point), paper.add(c_ref_point) # pause time.sleep(1) # scaling all objects r.scale(0.5), c.scale(0.5) #pause time.sleep(1) # scaling again all objects r.scale(0.5), c.scale(0.5) #pause time.sleep(1) # scaling again all objects r.scale(0.5), c.scale(0.5) main()