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
1
Christmas Ornaments
By
Haroon Rasheed
Run
def christmasOrnament(c): backPart = circle(fill=c, stroke="none", r=100) c1 = color(r=0, g=0, b=0, a=0.1) shadePart = circle(fill=c1, stroke="none", r=100) mainPart = circle(fill=c, stroke = "none", r=100/1.2, x=-10, y=13) c2 = color(r=255, g=255, b=255, a=0.5) shine1 = circle(fill=c2, stroke="none", r=25, x=-50, y=40) shine2 = circle(fill=c2, stroke="none", r=100/6, x=-15, y=70) handle = rectangle(w=50, h=100/3, x=0, y=100, stroke="none", fill="gold") ring = circle(r=15, stroke="gold", stroke_width=5, x=0, y=120) return ring + handle + backPart+ shadePart + mainPart + shine1 + shine2 shape1 = christmasOrnament("green") | scale(.5) | translate(x=75, y=75) shape2 = christmasOrnament("blue") | scale(.5) | translate(x=-75, y=75) shape3 = christmasOrnament("red") | scale(.5) | translate(x=-75, y=-75) shape4 = christmasOrnament("orange") | scale(.5) | translate(x=75, y=-75) show(shape1, shape2, shape3, shape4)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login