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
2
Argentina Flag
By
Samrudh N
Run
#Country: Argentine Republic #Description: Representing Argentina Flag. #version: 1.0.0 #Status: Completed #Comments: Used svg path editor online for some of the custom shapes at https://yqnn.github.io/svg-path-editor/ #Co-ordinate points for the sun spokes. p1 = point(x=0,y=45) p2 = point(x=-1.5,y=20) p3 = point(x=1.5,y=20) #Individual components of the Argentina flag. sky_blue_rectangle = rectangle(w=300, h=300, fill="#6CACE4",stroke="none") white_rectangle = rectangle(w=300, h=100, fill="#FFFFFF",stroke="none") base_flag_color = sky_blue_rectangle + white_rectangle #Sun emblem. yellow_circle = circle(r=20, fill="#FFB81C", stroke="#7D4016") #Sun spokes. ray_triangle = polygon([p1,p2,p3], fill="#FFB81C", stroke="#7D4016") | repeat(16, rotate(22.6)) #Sun curvy rays ray_curve = Shape("path",d="M1 0-1 0C-2-4-2-9-1-12 0-14 0-15-1-17-2-19-2-21 0-24-1-21-1-19 0-17 1-15 1-14 0-12-1-9 0-4 1 0", stroke="#7D4016", fill="#FFB81C") | scale(1.08) |scale(y=-1) |translate(x=0,y=20) |rotate(11.3) |repeat(16, rotate(22.6)) #Sun face features. #Sun eye eye_ellipse = ellipse(w=8,h=4,stroke="#7D4016") eye_pupil = circle(r=2, stroke="none", fill="#7D4016") right_eye = eye_ellipse + eye_pupil | translate(7.5,0) left_eye = right_eye |scale(x=-1) eyes = right_eye + left_eye #eye brow right_eye_brow = Shape("path", d="M-5 0C-1 2 1 2 5 0", stroke="#7D4016", stroke_width=1.2) |translate(6.5,3) | scale(1.1) left_eye_brow = right_eye_brow |scale(x=-1) eye_brow = right_eye_brow + left_eye_brow #nose right_side_nose = Shape("path", d="M-5 0C-1 2 1 2 5 0", stroke="#7D4016", stroke_width=0.8) | rotate(90) | translate(2.5,-1) left_side_nose = right_side_nose |scale(x=-1) nose_passage = right_side_nose + left_side_nose nose_bottom = Shape("path", d="M-5-1C-5 1-4 1-3 0-1 1 1 1 3 0 4 1 5 1 5-1", stroke="#7D4016", stroke_width="2") | rotate(180) |translate(0,-11) |scale(0.7) nose = nose_passage + nose_bottom #mouth mouth = ellipse(w=7,h=2,stroke="#7D4016") | translate(0,-11) #chin chin_curve = Shape("path",d="M-2 0C-1 3 1 3 2 0", stroke="#7D4016") | translate(0,-15.5) #combine all the various shapes and assign them to a single variable. argentina_flag = base_flag_color + yellow_circle + ray_triangle + ray_curve + eyes + eye_brow + nose + mouth + chin_curve #display the flag. show(argentina_flag)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login