Номер слайду 6
Приклад анімації в Pythonfrom graphics import *import timewin = Graph. Win("Окно для графики", 400, 400)win.set. Background('white')x = [10, 20, 30]y = [100, 200, 300]def car(x, y, color, flag): body = Polygon( Point(x, y), Point(x, y - 10), Point(x + 10, y - 20), Point(x + 30, y - 20), Point(x + 40, y - 10), Point(x + 50, y - 10), Point(x + 50, y)) wheel1 = Circle(Point(x + 8, y + 4), 4) wheel2 = Circle(Point(x + 42, y + 4), 4) window = Polygon( Point(x + 20, y - 12), Point(x + 20, y - 18), Point(x + 30, y - 18), Point(x + 36, y - 12)) body.set. Outline(color) body.set. Fill(color) wheel1.set. Fill("black") wheel2.set. Fill("black") window.set. Outline("cyan") window.set. Fill("cyan") if flag == 1: body.draw(win) wheel1.draw(win) wheel2.draw(win) window.draw(win) if flag == 0: body.set. Outline('white') body.set. Fill('white') wheel1.set. Fill("white") wheel1.set. Outline('white') wheel2.set. Fill("white") wheel2.set. Outline('white') window.set. Outline("white") window.set. Fill("white") body.draw(win) wheel1.draw(win) wheel2.draw(win) window.draw(win)for i in range(20): car(x[0], y[0], 'green', 1) car(x[1], y[1], 'green', 1) car(x[2], y[2], 'green', 1) time.sleep(1) car(x[0], y[0], 'green', 0) car(x[1], y[1], 'green', 0) car(x[2], y[2], 'green', 0) x[0] += 10 x[1] += 10 x[2] += 10win.get. Mouse()win.close()