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
Sara Varghese_2024_MEC
By
Sara Varghese
Run
def pookkalam(): outer() triangle() yring() randomd() leaf() concircle() spiro() #outermost ring def outer(): o1=circle(r=145,stroke="hotpink", fill='red', stroke_width="3") o2= ellipse(h=13, w=3,fill='gold',stroke="none")|translate(y= 145)|repeat(100, rotate(5)) o=combine([o1,o2]) show(o) #triangle edge ring def triangle(): t1=rectangle(w=210,h=210,fill='oldlace',stroke_width="0.07")|repeat(40,rotate(9)) t2=rectangle(w=187,h=187,fill='darkorange',stroke_width="0.1",stroke="#fff2cb")|repeat(40,rotate(9)) t3=rectangle(w=175,h=175,fill='orangered ',stroke_width="0.1",stroke="#ffaf00")|repeat(36,rotate(10)) t4=rectangle(w=160,h=160,fill='red',stroke_width="2",stroke="#ff3f00")|repeat(24,rotate(15)) | rotate(10) touter=combine([t1,t2,t3,t4]) show(touter) #middle yellow ring def yring(): mc=circle(r=90,fill='gold',stroke_width="4",stroke="#ff0037") show(mc) #random dots def randomd(): d= ellipse(w=1,h=9,fill='darkgreen',stroke_width="0.5",stroke="olivedrab")|translate(y= -100)|repeat(100, rotate(10)) show(d) d1 = circle(r=5, fill='gold',stroke_width="3.5",stroke="yellow")|translate(y= -100)|repeat(12, rotate(30)) d2 = circle(r=1, fill='red',stroke='None')|translate(y= -100)|repeat(12, rotate(30)) d3= circle(r=2,fill='red',stroke_width="1.7",stroke="hotpink")|translate(y= -80)|repeat(10, rotate(37)) dot=combine([d1,d2,d3]) show(dot) #green spikes def sq(color,l,x,y): r=rectangle(h=l,w=l,x=x,y=y,stroke='none',fill=color) return r def green(x,y,l): s1=sq(l=l,x=x,y=y,color='forestgreen') s2=sq(l=4*(l/5),x=x,y=y,color='green') s3=sq(l=3*(l/5),x=x,y=y,color='darkgreen') s4=sq(l=2*(l/5),x=x,y=y,color='yellow') n=combine([s1,s2,s3,s4]) return n def leaf(): leaf=green(x=30,y=30,l=50) | repeat(10,rotate(36)) |scale(1.1) show(leaf) #middle concentric rings def concircle(): cc1=circle(r=60,fill='orange', stroke_width=3, stroke='olivedrab') cc2=circle(r=50,fill='red',stroke='orangered',stroke_width=5) cc3=circle(r=40,fill='crimson',stroke='none') cc4=circle(r=35,fill='oldlace',stroke='none') centre=combine([cc1,cc2,cc3,cc4]) show(centre) #center spirograph ring def spiro(): f1=ellipse(w=30,h=17,x=20,y=0,stroke="mediumvioletred",stroke_width=16,fill="yellow") | repeat(50, rotate(40)) f2=ellipse(w=30,h=17,x=20,y=0,stroke="palevioletred",stroke_width=10,fill="pink") | repeat(50, rotate(40)) f3=ellipse(w=30,h=17,x=20,y=0,stroke="mediumvioletred",stroke_width=0.5,fill="violetred") | repeat(40, rotate(50)) f4=ellipse(w=15,h=8,x=10,y=0,stroke="red",stroke_width=0.5,fill="bisque") | repeat(16, rotate(30)) f5=ellipse(w=5,h=5,x=0,y=0,fill="red", stroke="None") flower=combine([f1,f2,f3,f4,f5]) show(flower) pookkalam()
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login