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
Random Pookalam
By
Gayatri
Run
def random_color(): r = random(255) g = random(255) b = random(255) return color(r=r, g=g, b=b, a=0.5) bud = circle(r=20,fill=random_color()) petal1 = circle(y=60,r=20,stroke="#00000",stroke_width = 1,fill=random_color()) petal2 = circle(y=40,r=15,stroke="#00000",stroke_width = 1,fill=random_color()) petal3 = circle(y=20,r=10,stroke="#00000",stroke_width = 1,fill=random_color()) petals = (petal1+petal2+petal3 | repeat(8,rotate(45))) flower =(bud+petals) | scale(0.25) flower_ring = flower | translate(x=50,y=30) | repeat(8,rotate(45)) flowerbed = flower_ring | repeat(5, scale(2) | rotate(45/2)) bg = rectangle(x=0,y=0,h=300,w=300,fill="#FFFF99") show(bg) show(flowerbed | scale(0.125))
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login