Arc de Triomphe

Back to index

In case you don't already know, the Arc de Triomphe is a famous monument in Paris, France. This lesson has everything to do with arcs and not a lot to do with famous monuments. To kick things off, take a look at this sample program.
#!/usr/bin/python from tkinter import * master = Tk() w = Canvas(master, width=300, height=100) w.pack() c = ["red","blue","green","purple","yellow","cyan","magenta","orange"] for x in range(0,8): w.create_arc(10,10,90,90,start=x*45,extent=45,fill=c[x],style=PIESLICE) w.create_arc(110,10,190,90,start=0,extent=180,fill="red",style=CHORD) w.create_arc(110,10,190,90,start=20,extent=140,fill="blue",style=CHORD) w.create_arc(110,10,190,90,start=40,extent=100,fill="orange",style=CHORD) w.create_arc(110,10,190,90,start=60,extent=60,fill="green",style=CHORD) w.create_arc(110,10,190,90,start=0,extent=-180,fill="yellow",style=CHORD) w.create_arc(110,10,190,90,start=350,extent=-160,fill="purple",style=CHORD) w.create_arc(110,10,190,90,start=330,extent=-120,fill="cyan",style=CHORD) w.create_arc(110,10,190,90,start=310,extent=-80,fill="magenta",style=CHORD) w.create_arc(210,10,290,90,start=30,extent=290,dash=(5,2,3,2), width=5, style=ARC) w.create_arc(240,40,260,60,start=135,extent=180,activefill="red",fill="blue",style=PIESLICE) w.create_arc(240,40,260,60,start=315,extent=180,activefill="purple",fill="yellow",style=PIESLICE) mainloop()
You will notice that there are a lot of attributes used with the create_arc method and there are actually many more than are shown in this sample program. Take time to sort them out and experiment with them.
ASSIGNMENT:

Write a Python program which creates the following design. Other than one rectangle to fill in the background color, you may only use the create_arc method to complete this assignment.