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
4
Australian Flag
By
Samrudh N
Run
#Country: Commonwealth of Australia #Description: Representing Australian Flag. #version: 1.0.0 #Status: WIP #Comments: #Individual components of the Australian flag. #First creating the union jack separately and then scaling it down uj_blue_rectangle = rectangle(w=300,h=300, fill="#012169", stroke="none") #union jack cross uj_white_cross_one = rectangle(w=600,h=50, fill="#FFFFFF", stroke="none") |rotate(45) uj_white_cross_two = uj_white_cross_one | rotate(90) uj_red_cross_one = rectangle(w=200, h=20, fill="#E4002B", stroke="none") |rotate(45) |translate(75,90) uj_red_cross_two = uj_red_cross_one |scale(x=-1) |translate(-25,-5) uj_red_cross_three = uj_red_cross_one| rotate(180) uj_red_cross_four = uj_red_cross_two | rotate(180) union_jack_cross = uj_white_cross_one + uj_white_cross_two + uj_red_cross_one + uj_red_cross_two + uj_red_cross_three + uj_red_cross_four #union jack plus symbol uj_white_plus_one = rectangle(w=300, h=70, fill="#FFFFFF", stroke="none") uj_white_plus_two = uj_white_plus_one |rotate(90) uj_red_plus_one = rectangle(w=300, h=40, fill="#E4002B", stroke="none") uj_red_plus_two = uj_red_plus_one |rotate(90) union_jack_plus = uj_white_plus_one + uj_white_plus_two + uj_red_plus_one + uj_red_plus_two #the complete union jack put together. union_jack = uj_blue_rectangle + union_jack_cross + union_jack_plus |scale(0.55) |translate(-75,75) #Rest of the flag items blue_rectangle_mask_one = rectangle(y=-75,w=300, h=150, fill="#012169", stroke="none") blue_rectangle_mask_two = rectangle(x=75,w=150, h=300, fill="#012169", stroke="none") blue_masks = blue_rectangle_mask_one + blue_rectangle_mask_two #Co-rdinate points for the triangles to create stars. p1 = point(x=0,y=30) p2 = point(x=-10,y=0) p3 = point(x=10,y=0) #star component. seven_side_star = polygon([p1,p2,p3], fill="#FFFFFF", stroke="none") |repeat(7, rotate(51.42)) five_side_star = polygon([p1,p2,p3], fill="#FFFFFF", stroke="none") | repeat(5, rotate(72)) five_side_star_one = five_side_star |scale(0.3) | translate(90,-10) seven_side_star_one = seven_side_star | scale(1.2) |translate(-75,-75) seven_side_star_two = seven_side_star | scale(0.5) | translate(40,15) seven_side_star_three = seven_side_star | scale(0.5) | translate(75,90) seven_side_star_four = seven_side_star | scale(0.5) | translate(120,30) seven_side_star_five = seven_side_star | scale(0.5) | translate(75,-90) stars = five_side_star_one + seven_side_star_one + seven_side_star_two + seven_side_star_three + seven_side_star_four + seven_side_star_five #combine all the various shapes and assign them to a single variable. australian_flag = union_jack + blue_masks + stars #display the flag. show(australian_flag)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login