Flags Tutorial

From Progzoo
Revision as of 19:14, 20 July 2008 by Andr3w (talk | contribs) (New page: __NOTOC__ __NOEDITSECTION__ In these exercises you draw the flags of various countries using graphics commands. {{Table6 |1) Rectangles|Tut1page1.png|The '''[[Tutorial/Flags/1 Rectang...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In these exercises you draw the flags of various countries using graphics commands.

The rectangles tutorial has you drawing the flags of Libya, France, Germany and Palau. You can draw these flags using only rectangles of different colors. These exercise get you used to some graphics commands. You might need to be reminded of x,y coordinates.
[[The polygons tutorial includes flags made with triangles and other polygons. The flags of Napier University, Jamaica and the Bahamas can be drawn with triangles, the Seychelles require triangles and a quadrilateral.

|The lines tutorial includes flags that require lines. By changing the color and the thickness of the lines drawn you can produce the flags of England, Scotland, Botswana and Trinidad and Tobago.

File:3) Polygons
4) Stars

[[Image:The stars tutorial includes flags that feature the pentangle - a five pointed star. In each example the star has already been defined as a polygon - all you have to do is to translate and scale the star to produce the flags of Vietnam, Panama, Bosina Herzeginia and Zaire. |thumb|left|5) Repeat]]The repeats tutorial focuses on flags that include repetition. You can use loops, such as for to perform the same action over and over. This is how to draw the flag of Bahrain or Qatar, also India, Namibia and the European Union.

[[{{{19}}}|6) Hard]]
The harder tutorials includes flags that include repetition that can be exploited. Your aim in tackling these problems is to produce short code that makes the most of the repetition. Ideally you will be defining your own methods or subroutines.




See also SVG:Tutorial