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
hat
By
Aryalekshmi
Run
#background r1 = rectangle(x=75, y=75, w=150, h=150,fill="green") r2 = rectangle(x=-75, y=-75, w=150, h=150,fill="green") r3 = rectangle(x=75, y=-75, w=150, h=150,fill="yellow") r4 = rectangle(x=-75, y=75, w=150, h=150,fill="yellow") show(r1, r2,r3,r4) # the beside, below and grid functions are already defined for you def beside(a, b): a1 = a | scale(x=0.5) | translate(x=-75) b1 = b | scale(x=0.5) | translate(x=75) return a1 + b1 def below(a, b): a1 = a | scale(y=0.5) | translate(y=75) b1 = b | scale(y=0.5) | translate(y=-75) return a1 + b1 def grid(a, b, c, d): return below( beside(a, b), beside(c, d)) # define the repeat64 function here def repeat64(ball): ball1 = grid(ball,ball,ball,ball) ball2 = grid(ball,ball,ball,ball) ball3 = grid(ball,ball,ball,ball) ball4 = grid(ball,ball,ball,ball) balla = grid(ball1,ball2,ball3,ball4) ball5 = grid(ball,ball,ball,ball) ball6 = grid(ball,ball,ball,ball) ball7 = grid(ball,ball,ball,ball) ball8 = grid(ball,ball,ball,ball) ballb = grid(ball5,ball6,ball7,ball8) ball9 = grid(ball,ball,ball,ball) ball10 = grid(ball,ball,ball,ball) ball11 = grid(ball,ball,ball,ball) ball12 = grid(ball,ball,ball,ball) ballc = grid(ball9,ball10,ball11,ball12) ball13 = grid(ball,ball,ball,ball) ball14 = grid(ball,ball,ball,ball) ball15 = grid(ball,ball,ball,ball) ball16 = grid(ball,ball,ball,ball) balld = grid(ball1,ball2,ball3,ball4) ball=grid(balla,ballb,ballc,balld) return ball # make a ball and cycle of it ball = circle(fill="red") + rectangle(fill="yellow",x=100,y=0,w=50,h=100) + rectangle(x=150, y=0,fill="black",w=40,h=30) shape = repeat64(ball) show(shape) #hat p1 = point(x=0,y=150) p2 = point(x=70,y=0) p3 = point(x=-70,y=0) s3=polygon ([p1,p2,p3],fill="red") t1=s3+circle(r=20,fill="white",x=0,y=150)|rotate(30) show(t1)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login