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
3
Atthapoovu 2k22
By
K S ABHISHEK
Run
def outer(): c=circle(r=145,fill="#000000") g2=combine((circle(r=100,fill="#FFFAFA",stroke_width=0),circle(r=95,fill="#8B008B",stroke_width=0),circle(r=80,fill="#000000",stroke_width=0))) shape=polygon([point(0,145),point(50,125),point(0,0)],fill="#B22222")|repeat(16,rotate(22.49)) g=ellipse(h=85,w=10,fill="#FFFF00",stroke_width=0)|repeat(4,rotate(45))|scale(0.4)|translate(y=120)|repeat(10,rotate(36)) g1=circle(r=5,y=87,fill="#FFFAFA",stroke_width=0)|repeat(10,rotate(36)) show(c,shape,g,g2,g1) def face1(): e=ellipse(h=140,w=275,stroke_width=0,fill="#f77e14")|rotate(90)|scale(0.5) e1=ellipse(h=20,w=40,fill="#0d0c0d")+ellipse(h=9,w=25,fill="#fafafa")+circle(r=5,fill="#0d0c0d")|translate(-25,-45)|rotate(-10)|scale(0.5) s11=polygon([point(-7,-51),point(-7,-33),point(-23,-30),point(-35,-25),point(-35,0),point(-38,0),point(-38,-15),point(-68,-30),point(-56,-50),point(-38,-59),point(-20,-57)],fill="#0d0c0d",stroke_width=0)|scale(0.5) e3=polygon([point(-20,0),point(-20,-20),point(0,-30),point(0,0)],fill="black",stroke_width=0)|scale(0.5) e4=polygon([point(-15,0),point(-15,-15),point(0,-23),point(0,0)],fill="#ab0202",stroke_width=0)|scale(0.5) show(e,s11,e1,e3,e4) def teeth(): t=point(-20,-100) t6=point(-27,-105) t5=point(-32,-107) t1=point(-40,-101) t7=point(-45,-97) t2=point(-55,-87) t3=point(-85,-89) t4=point(-55,-80) t8=point(-32,-101) m=polygon([t,t6,t5,t1,t7,t2,t3,t4,t8],fill="white",stroke_width=0)|scale(0.5) show(m) def face2(): k1=point(0,-138) k9=point(25,-130) k10=point(45,-122) k2=point(60,-110) k11=point(64,-100) k12=point(64,-90) k3=point(60,-80) k4=point(60,-70) k13=point(61,-60) k14=point(62,-59) k5=point(63,-55) k6=point(69,-40) k15=point(70,-35) k16=point(72,-23) k7=point(74,0) k8=point(0,-0) k=polygon([k1,k9,k10,k2,k11,k12,k3,k4,k13,k14,k5,k6,k15,k16,k7,k8],fill="#16b007",stroke_width=0)|scale(0.5) k17=ellipse(h=20,w=40,fill="#0d0c0d",stroke_width=0)+ellipse(h=9,w=25,fill="#fafafa",stroke_width=0)+circle(r=5,fill="#0d0c0d",stroke_width=0)|translate(25,-45)|rotate(10)|scale(0.5) k18=rectangle(h=9,w=20,fill="black",stroke_width=0)|translate(51,-47)|rotate(13)|scale(0.5) k20=rectangle(h=5,w=15,fill="black",stroke_width=0)|translate(3,-47)|rotate(13)|scale(0.5) k21=line(6,-53,6,-37,stroke_width=1.5)|scale(0.5) k22=line(6,-37,13,-32,stroke_width=1.5)|scale(0.5) k23=polygon([point(8,-30),point(49,-14),point(52,-19),point(73,-12),point(72,-23),point(47,-29),point(43,-23)],fill="black",stroke_width=0)|scale(0.5) k24=circle(r=7,x=33,y=-98,fill="#f5053d",stroke_width=0)|scale(0.5) s=polygon([point(0,-100),point(-30,-100),point(-15,-93)],fill="#8f0000",stroke_width=0)|scale(0.5) s1=s|scale(x=-1) s2=polygon([point(-20,-100),point(-11,-105),point(0,-108),point(11,-105),point(20,-100)],fill="#f5053d",stroke_width=0)|scale(0.5) s3=line(0,-82,-7,-80,stroke_width=1.5)|scale(0.5) s4=line(-7,-80,-12,-72,stroke_width=1.5)|scale(0.5) s5=line(-12,-72,-19,-73,stroke_width=1.5)|scale(0.5) s6=line(-19,-73,-9,-63,stroke_width=1.5)|scale(0.5) s7=s3|scale(x=-1) s8=s4|scale(x=-1) s9=s5|scale(x=-1) s10=s6|scale(x=-1) s11=polygon([point(20,0),point(20,-20),point(0,-30),point(0,0)],fill="yellow",stroke_width=0)|scale(0.5) s12=polygon([point(15,0),point(15,-15),point(0,-23),point(0,0)],fill="red",stroke_width=0)|scale(0.5) show(k,k17,k18,k20,k21,k22,k23,s,s1,k24,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12) def cheek(): for i in range(60): white=color(r=i+170,g=i+175,b=i+180) f=ellipse(h=65,w=120,fill=white,stroke_width=0)|translate(-9,-107)|rotate(30)|repeat(3,translate(x=-10))|scale(0.5) show(f) def crown(): c1=circle(r=121,y=27,stroke_width=0,fill="#FF0000")+circle(r=105,y=27,stroke_width=0,fill="#008000")+circle(r=85,y=27,stroke_width=0,fill="#800000")|scale(0.5) d1=circle(r=4,y=113,stroke_width=0,fill="black")|repeat(24,rotate(15))|translate(y=25)|scale(0.5) d2=rectangle(h=12,w=9,y=95,fill="#FF0000",stroke_width=0)|repeat(24,rotate(15))|translate(y=26)|scale(0.5) show(c1,d1,d2) def crown2(): c2=polygon([point(80,0),point(-80,0),point(-80,40),point(-68,55),point(68,55),point(80,40)],fill="#FFD700",stroke_width=0)|scale(0.5) c3=polygon([point(-68,55),point(-68,87),point(-50,100),point(50,100),point(68,87),point(68,55)],fill="#FFD700",stroke_width=0)|scale(0.5) c4=polygon([point(-50,100),point(-50,120),point(-40,128),point(40,128),point(50,120),point(50,100)],fill="#FFD700",stroke_width=0)|scale(0.5) c5=polygon([point(-40,128),point(0,150),point(40,128)],fill="#FFD700",stroke_width=0)|scale(0.5) c8=rectangle(w=15,h=15,x=-50,y=76,fill="#008000",stroke_width=0)|repeat(5,translate(x=25))|scale(0.5) c9=ellipse(h=15,w=10,x=-40,y=114,fill="#800000",stroke_width=0)|repeat(5,translate(x=20))|scale(0.5) c10=rectangle(w=17,h=17,x=-22,y=62,fill="#FF4500",stroke_width=0)|rotate(45)|repeat(5,translate(x=30))|scale(0.5) c11=circle(r=3,x=-59,y=7,fill="#000000",stroke_width=0)|repeat(5,translate(x=30))|scale(0.5) c12=circle(r=3,x=-59,y=47,fill="#000000",stroke_width=0)|repeat(5,translate(x=30))|scale(0.5) show(c2,c3,c4,c5,c8,c9,c10,c11,c12) def gold(): c6=circle(r=35,stroke_width=0,fill="#FF4500")+circle(r=25,stroke_width=0,fill="#FFD700")+circle(r=12,stroke_width=0,fill="#FFFFFF")+circle(r=7,stroke_width=0,fill="#FF0000")|translate(89,-30)|scale(0.5) c7=c6|scale(x=-1) show(c6,c7) def bg(): for i in range(160): red=color(r=i+145,g=i+155,b=i+165) x=circle(x=0, y=0, fill=red, r=220-i, stroke="none") show(x) def calling(): bg() outer() crown() gold() cheek() face1() face2() teeth() crown2() calling()
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login