Notes:
Celebrate Valentines day with some nifty wallpaper tiling using nested loops and the modulus operator, with, of course, our beloved TNTHeart!
Features:
| Comments: | A study of TNTHeart reveals that a 'standard' heart requires a certain combination of 5 parameters, a-e. To maintain a heart shape of varying size, this code scaled each of the standard values with a scaling factor, ftr. We just had to monkey with it to fit in the canvas...by trial and error. |
|---|---|
| Even More: | The modulus operator, %, is used to find the remainder when 2 numbers are divided. For example, 7 % 2 = 1 and 10 % 2 = 0. This operator can be used to determine whether a number is even or odd. In our wallpaper, an even heart is red and right-side-up (rotation = 0°), an odd heart is pink and upside-down (rotation = 180°). |
