Explore
Courses
Batches
Sketches
Statistics
Code a Pookkalam
Jobs
Devsprint
People
Course Creation
Create a Course
Guidelines
Resources
Support
Blogs
My Profile
About Us
Login
Sketches
0
New Sketch
By
Sreekanth S
Run
def concentric_circles(x, y, r, n,fill,stroke,a): # we start with drawing the outer circle first # and start moving inside, drawing circles one by one step = r/n for i in range(n): c = circle(x=x, y=y, r=r,fill=fill,stroke=stroke,a=a) show(c) r = r-step w, h = 100, 100 r = 100 n = 10 # concentric circles at the center of the canvas concentric_circles(0, 0, r, n,fill="red",stroke="none") # concentric circles at each corner concentric_circles(w/2, h/2, r, n,stroke ="none",fill="blue") concentric_circles(w/2, -h/2, r, n,stroke="none",fill="yellow") concentric_circles(-w/2, h/2, r, n,stroke="none",fill="blue") concentric_circles(-w/2, -h/2, r, n)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login