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
Sreelakshmi Thirumala
Run
fill=color(r=255,g=0,b=0) c2=circle(x=0,y=0,r=75,fill='red',stroke='yellow',stroke_width=5) c1=circle(x=0,y=0,r=50,fill='orange',stroke='yellow',stroke_width=5) c14=circle(r=25,fill='#ff00ff',stroke='yellow',stroke_width=5) c3=circle(fill='black',r=150,stroke='yellow',stroke_width=5) c8=circle(r=125,fill='green',stroke='yellow',stroke_width=5) c13=circle(r=100,fill='#00ff18',stroke='yellow',stroke_width=5) show(c3,c8,c13,c2,c1,c14) c4=circle(fill='blue',x=0,y=100,r=50,stroke='yellow',stroke_width=5) c5=circle(fill='blue',x=100,y=0,r=50,stroke='yellow',stroke_width=5) c6=circle(fill='blue',x=0,y=-100,r=50,stroke='yellow',stroke_width=5) c7=circle(fill='blue',x=-100,y=0,r=50,stroke='yellow',stroke_width=5) show(c4,c5,c6,c7) c15=circle(fill='blue',x=0,y=100,r=37.5,stroke='yellow',stroke_width=5) c16=circle(fill='blue',x=100,y=0,r=37.5,stroke='yellow',stroke_width=5) c17=circle(fill='blue',x=0,y=-100,r=37.5,stroke='yellow',stroke_width=5) c18=circle(fill='blue',x=-100,y=0,r=37.5,stroke='yellow',stroke_width=5) show(c15,c16,c17,c18) c9=circle(fill='blue',x=0,y=100,r=25,stroke='yellow',stroke_width=5) c10=circle(fill='blue',x=100,y=0,r=25,stroke='yellow',stroke_width=5) c11=circle(fill='blue',x=0,y=-100,r=25,stroke='yellow',stroke_width=5) c12=circle(fill='blue',x=-100,y=0,r=25,stroke='yellow',stroke_width=5) show(c9,c10,c11,c12) def make_grid(n): width=300 d=width/n xstart= -width/2 + d/2 ystart= width/2 - d/2 shapes= [] for i in range(n): for j in range(n): x=xstart+d*j y=ystart-d*i shape=make_shape(d) | translate(x=x,y=y) shapes.append(shape) return combine(shapes) def make_shape(width): return random_concentric_circles(n=10,max_radius=width/2) def random_concentric_circles(n,max_radius): shapes=[] for i in range(n): r=random(max_radius) c=circle(r=r) shapes.append(c) return combine(shapes) shape = make_grid(7) show(shape)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login