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
Right Split
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)) shape = circle()+ellipse()+circle(x=75, r=25) blank = circle(r=0) split1 = beside(shape, blank) split2 = beside(shape, below(split1, split1)) split3 = beside(shape, below(split2, split2)) split4 = beside(shape, below(split3, split3)) s = below(split4, blank) show(s)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login