All, I thought this might be a cool little programming challenge that might even make the metafun manual, as technique employed might be unique. I'd like to talk about the Sieve of Eratosthenes in class next week, specifically to find the primes between 1 and 100. This involves listing the integers from 1 to 100 in a 10 by 10 array. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... ... 91 92 93 94 95 96 97 98 99 100 1 is not prime and can be deleted from the discussion. They way the "sieve" works is to note that 2 is prime, but 4, 6, 8, etc, are not, because they are multiples of 2. The student now goes through the "sieve" crossing out all multiples of 2 (every other number). Then, 3 is a prime, and the student goes through the "sieve" crossing out every multiple of 3 (6, 9, 12, etc). Continue in this process, and the "sieve," when finished, will contain the primes from 1 to 100. Now, for my graphic requirements. 1. Make a grid 10 by 10 with gridlines. This will form 100 boxes to contain the numbers from 1 to 100. 2. Make the entire grid take up as much space as possible on us letter or a4 paper (for an overhead transparency). 3. Put the numbers centered in each "box" formed by the grid. Big numbers of course. Things to learn. 1. This might be a good example for outline fonts for Context users to study. So, setting up the fonts would be a cool example. 2. Would this be an array of boxes? 1 or 2-dimensional? 3. A nice loop for inserting the numbers automatically? 4. Thicker line styles and use of color? I'd love to see different approaches. A good opportunity to learn new technique and ideas for attacking this problem.
On Sat, 16 Aug 2003 14:23:28 -0700
David Arnold
I'd love to see different approaches. A good opportunity to learn new technique and ideas for attacking this problem.
I'll make a shameful admission: when I have tasks like this, I generate the TeX source from another language, usually Python these days. A REAL TeX user would be more clever, or use metapost, which I've never used. -Bill -- Sattre Press Curiosities of the Sky http://sattre-press.com/ by Garrett Serviss info@sattre-press.com http://csky.sattre-press.com/
participants (2)
-
Bill McClain
-
David Arnold