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
peas
By
Salman Nazeer
Run
def grid(n): c_width = 300 width = 300 / n xstart = -150 + width/2 ystart = -150 + width/2 shapes = [] for i in range(n): for j in range(n): x = xstart + width * i y = ystart + width * j s = spheroid(300//n) | translate(x=x, y=y) shapes.append(s) return combine(shapes) def spheroid(r): shapes = [] col = random(0, 256) for i in range(r): shapes.append(circle(r=100*i/256, stroke=color(col-i, 256-i, 0))) return combine(shapes) show(grid(6))
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login