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
Christmas trees forest
By
Ann Vincent
Run
#top portion #defining points for triangle p1=point(x=0,y=150) p2=point(x=75,y=75) p3=point(x=-75,y=75) t1=polygon([p1,p2,p3],fill="green",stroke="#8fb395") #2nd and 3rd triangles t2=t1|translate(y=-25) t3=t1|translate(y=-50) #the wood/bark part r=rectangle(h=75,w=10,y=-10,fill="brown",stroke="none") #combining all shapes c=combine([t3,t2,t1,r])|scale(0.4) show(c) r2=c|repeat(3,translate(x=60)) r3=c|repeat(3,translate(x=-60)) r4=c|repeat(3,translate(x=60,y=50)) r5=c|repeat(3,translate(x=60,y=-50)) r6=c|repeat(3,translate(x=-60,y=50)) r7=c|repeat(3,translate(x=-60,y=-50)) r8=c|repeat(3,translate(x=0,y=70)) r9=c|repeat(3,translate(x=0,y=-70)) show(r2,r3,r4,r5,r6,r7,r8,r9)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login