By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
 462,167 Members | 682 Online
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,167 IT Pros & Developers. It's quick & easy.

# Concentric Colored Circles

 P: 2 An archery target consists of a central circle of yellow surrounded by concentric rings of red, blue,balck,white.Each ring has the same width which is the same aas the radius of the yellow circle.Write a program that draws such a target. I'm not getting it at all.I need help pleaseeeeeeeeee Nov 3 '06 #1
Share this Question
6 Replies

 Expert 5K+ P: 6,596 An archery target consists of a central circle of yellow surrounded by concentric rings of red, blue,balck,white.Each ring has the same width which is the same aas the radius of the yellow circle.Write a program that draws such a target. I'm not getting it at all.I need help pleaseeeeeeeeee What point are you up to? Can you do any graphics? What tools are you using? Tkinter, etc.? Is it just the math that you are hung up on? Tell us more. We're here to help you get started, Barton Nov 3 '06 #2

 Expert 100+ P: 127 Hi, since its friday (and I passed the teoretical driver test), here how you could do it in Tkinter... Expand|Select|Wrap|Line Numbers from Tkinter import *   root = Tk()   # target..   fills = ["#ff0000","#00ff00","#0000ff","#00ffff","#ff00ff","#ffff00"]   w = Canvas(root, width=300, height=300)   x0 = 0 y0 = 0 x1 = 300 y1 = 300   for i in fills:  w.create_oval(x0,y0,x1,y1,fill=i)  x0+=20  y0+=20  x1-=20  y1-=20   w.pack()   root.mainloop()   -kudos An archery target consists of a central circle of yellow surrounded by concentric rings of red, blue,balck,white.Each ring has the same width which is the same aas the radius of the yellow circle.Write a program that draws such a target. I'm not getting it at all.I need help pleaseeeeeeeeee Nov 3 '06 #3

 P: 2 What point are you up to? Can you do any graphics? What tools are you using? Tkinter, etc.? Is it just the math that you are hung up on? Tell us more. We're here to help you get started, Barton i'm using graphics.I have to make concentric circles in which the next circle will be drawn on the next circle. Nov 3 '06 #4

 Expert 5K+ P: 6,596 Hi, since its friday (and I passed the teoretical driver test), here how you could do it in Tkinter... Expand|Select|Wrap|Line Numbers from Tkinter import *   root = Tk()   # target..   fills = ["#ff0000","#00ff00","#0000ff","#00ffff","#ff00ff","#ffff00"]   w = Canvas(root, width=300, height=300)   x0 = 0 y0 = 0 x1 = 300 y1 = 300   for i in fills: w.create_oval(x0,y0,x1,y1,fill=i) x0+=20 y0+=20 x1-=20 y1-=20   w.pack()   root.mainloop()   -kudos Thanks, kudos! Tight code! I don't think that I would have been so succinct. Keep it up, Barton Nov 4 '06 #5

 P: 1 whats up guys .. i just have a Question.. i am working on a concetric circles or u can say a circle andd surrounded by 4 rings .. i wanna make them all color by clicking on them .. when i click on one of the rings or the circle .. it changes its color randomly .. i am done with drawing the circles and i came up with a mathimatical formula for my work .. r=math.sqrt(((getX-200)**2+((getY-200)**2) so any sugguestions or any help .. thanks in advance Nov 6 '07 #6

 Expert 5K+ P: 6,596 Almost a year, to the day! Kudos gave this wonderful solution (and even made it his avatar) last November. Nov 7 '07 #7

### Post your reply

Sign in to post your reply or Sign up for a free account.