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
Ultimate Complication Of Shape Manipulation Program
By
Srikar
Run
def beside(s1, s2): s1 = s1|scale(x=0.5)|translate(x=-75) s2 = s2|scale(x=0.5)|translate(x=75) return s1+s2 def below(s1, s2): s1 = s1|scale(y=0.5)|translate(y=75) s2 = s2|scale(y=0.5)|translate(y=-75) return s1+s2 def grid(s1, s2, s3, s4): top = beside(s1, s2) bottom = beside(s3, s4) whole = below(top, bottom) return whole def repeat4(shape): return grid(shape, shape, shape, shape) def repeat16(shape): return repeat4(repeat4(shape)) def cycle(shape): return grid(shape|rotate(90), shape, shape|rotate(180), shape|rotate(270)) show(repeat16(repeat4(cycle(grid(circle(stroke_width=8), rectangle(stroke_width=8), ellipse(stroke_width=8), line(stroke_width=8))))))
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login