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
spiral flower
By
Sahaja
Run
def bottomEllipse(x,y,w,h,fill): e = ellipse(x,y+h/2,w,h,fill=fill,stroke="none") return(e) def petal(x,y,h,c1,c2,c3): p1=bottomEllipse(x,y,h/2,h,fill=c1) p2=bottomEllipse(x,y,h/3,h/1.5,fill=c2) p3=bottomEllipse(x,y,h/4,h/2,fill=c3) return(p1+p2+p3) def flower(n,c1,c2): d = petal(0,n/4,n,c1,c2,c1)|repeat(8,rotate(45)) c=circle(r=n/4,fill=c2,stroke="none") return(d+c) d1=color(r=255, g=153, b=211) d2=color(r=255, g=0, b=144) f1 = flower(25,d1,d2) shape = f1| scale(0.8) | translate(y=100) | repeat(100, rotate(30) | scale(0.96)) show(shape)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login