After our last experiment, we drew a Swedish flag with Logo. Major code improvement:
1. Introduction of variable for flag size;
2. Using the direction keyword instead of turnright and turnleft to make it less ambiguous to the code reader.
Here is the final product:
Here is the code for it.
# Begin logo code
# End logo code
Chinese flag is next. This will be a bit challenging. We will need to figure out how to draw the stars, and tilt them in the right direction. That should also give us ideas on how to draw the US flag.
2 things are of interest:
1. The code above works for KTurtle 0.6 on Ubuntu 7.1 with KDE 3.5.8, but the same code does not work on Sabayon Professional 1.1, with KTurtle 0.6, KDE 3.5.7;
2. After the Swedish flag, I thought drawing other Nordic flags is just a matter of changing colors. Turns out that is not the case, because there are subtle design and dimension differences, especially for Norwegian and Icelandic flags.