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
KATHAKALI (MAKE-OVER PREPARATION)
By
Muhammed Safeer
Run
# Used reference code from Mickey Mouse Head Owner(Face Shape), Pookkalam 2 By Samyuktha P(Face Mask) and Drawing Shapes Lesson from Joy Course(Line) - Thak you, Just Created for Fun - Code is not well structured fCircle = circle(r=68, fill= "#000",stroke="none") c3= circle(r=100,fill="purple") c4=circle(r=120,fill="orange",stroke="orange") c = circle(r=12,x=50,fill="green",stroke="green") | repeat(12, rotate(angle=30)) c1 = circle(r=50,fill="yellow",stroke="green") c2 = circle(r=20,fill="orange", stroke="yellow") lines1 = line(x1=14.14,y1=14.14,x2=-14.14,y2=-14.14,stroke="yellow") | repeat(12, rotate(angle=30)) lines = line(x1=35.355,y1=35.355,x2=-35.355,y2=-35.355,stroke="orange") | repeat(12, rotate(angle=30)) sq = rectangle(w=169.68,h=169.68,fill="yellow",stroke="yellow") | repeat (12, rotate(30)) line3 = line(x1=-50,y1=12,x2=-100,y2=0,stroke="yellow") line4 = line(x1=-50,y1=-12,x2=-100,y2=0,stroke="yellow") tria=line3+line4 | repeat(12, rotate(angle=30)) # ear ear1 = circle(r=12,y=50,x=-60,stroke = "#f7d5c0", stroke_width="4px",fill= "#b83b15") ear2 = ear1 | translate(x=120) kammal1= circle(r=5,y=0,x=0, fill="yellow") | repeat(4, rotate(angle=17)) | translate(y=50,x=60) kammal2= circle(r=5,y=0,x=0, fill="yellow") | repeat(4, rotate(angle=17)) | translate(y=50,x=-60) earsB = combine([ear1,ear2, kammal1, kammal2]) | translate(y=-55) ears = combine([earsB]) # ears = combine([c4, sq, c3, c,c1,lines,c2,lines1,tria, earsB]) # nose noseCenter = ellipse(x=0,y=-2, fill="green" ,h=25,w=10, stroke="none") noseRightSide = ellipse(x=0,y=-4, fill="green" ,h=10,w=10)| translate(y= -3, x=5) noseLeftSide = ellipse(x=0,y=-4, fill="green" ,h=10,w=10)| translate(y= -3, x=-5) # noseBottom = ellipse(w=55, h= 10, y= 17, fill= "green", stroke="none") nose = combine([noseRightSide,noseLeftSide, noseCenter]) | translate(y=-11) # mouth mouthLayer1 = ellipse(w=50, h= 9,fill= "red", stroke="none" ) mouthLayer2 = ellipse(w=70, h= 4,fill= "red", stroke="none" ) mouthS = combine([mouthLayer1,mouthLayer2]) | translate(y=-35) mouthEDots1 = ellipse(w=11, h= 13,fill= "red") | translate(x=30) mouthEDots2 = ellipse(w=11, h= 13,fill= "red") | translate(x=-30) mouthEDots = combine([mouthEDots1,mouthEDots2]) | translate(y=-35) lipDivider = line(x1=-22, y1=0, x2=22, y2=0, stroke="#c00a08") | translate(y=-35) mouth = combine([mouthEDots, mouthS, lipDivider]) | translate(y=1) # mouth mask e = ellipse(w=100, h=100/2, fill = "#f7f7f7", stroke = "none") e1 = ellipse(w=70, h=90/2, fill = "#f2f2f2", stroke = "none") e2 = ellipse(w=50, h=80/2, fill = "white", stroke = "none") e3 = ellipse(w=30, h = 25, fill = "white", stroke = "none") x1 =combine([e,e1,e2,e3])| translate(y=-45, x= 25) | rotate(angle=10) x2 =combine([e,e1,e2,e3])| translate(y= -45, x= -25) | rotate(angle=-10) bottemMask = ellipse(w=50, h = 20, fill = "white", stroke = "none")| translate(y= -60) mouthM = combine([x1,x2, bottemMask]) # combine([mouthLayer1,mouthLayer2]) | translate(y=-15) | scale(1) #forehead p1=point(x=25,y=70) p2=point(x=-25,y=70) p3=point(x=20,y=40) p4=point(x=-20,y=40) p5=point(x=0,y=30) s = polygon([p1,p2,p4,p5,p3],fill="red",stroke="yellow",stroke_width=5) | repeat(1,rotate(45)) forehead = s # facial area (#FEE09F) ellipse1 = ellipse(h=70,w=60,x=15,y=22,fill= "#28b00a",stroke="none") ellipse2 = ellipse1 | translate(x=-15*2) ellipse3 = ellipse(h=55,w=75,x=5,y=-30,fill= "#28b00a",stroke="none")|rotate(25) ellipse4 = ellipse(h=55,w=75,x=-5,y=-30,fill= "#28b00a",stroke="none")|rotate(-25) #rotate after translate gives different output facialArea = combine([ellipse1,ellipse2,ellipse3,ellipse4,forehead]) # Kavil (#FEE09F) kavil3 = ellipse(h=35,w=45,x=5,y=-30,fill= "#1eb50b",stroke="none")|rotate(25) kavil4 = ellipse(h=35,w=45,x=-5,y=-30,fill= "#1eb50b",stroke="none")|rotate(-25) #rotate after translate gives different output kavil = combine([ kavil3,kavil4]) #shadow shadow1 = ellipse(h=70,w=60,x=15,y=22,fill= "green",stroke="none") shadow2 = shadow1 | translate(x=-15*2) shadow3 = ellipse(h=60,w=80,x=5,y=-30,fill= "green",stroke="none")|rotate(25) shadow4 = ellipse(h=60,w=80,x=-5,y=-30,fill= "green",stroke="none")|rotate(-25) #rotate after translate gives different output facialShadow = combine([shadow1,shadow2,shadow3,shadow4]) # jaw jaw = ellipse(h=68,w=68/1.2,y=-68/2,fill="yellow" , stroke_width=3) faceCircle=combine([fCircle,jaw]) # EYE eye0 = ellipse(fill= "#fff" ,h=11,w=32) eye1 = eye0 | translate(x=-19) eye2 = eye0 | translate(x=19) eyeWhite = combine([eye1,eye2]) | translate(y=7) eyeball0 = ellipse(fill= "#000" ,h=10,w=10) eyeball1 = eyeball0 | translate(x =17,y=7) eyeball2 = eyeball0 | translate(x =-17,y=7) eyeball = combine([eyeball1,eyeball2]) eye = combine([eyeWhite, eyeball1,eyeball2]) show(combine([faceCircle,ears,mouthM,facialShadow, facialArea,kavil,mouth,nose,eye]))
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login