From: marc spitzer
Subject: ruby quiz 127
Date: 
Message-ID: <slrnfintcd.la8.ms4720@sverige.freeshell.org>
Mexican Blanket (#127)

by Scott Prager

I'm looking at this blanket my dad got in Mexico, and I'm noticing that
it has an interesting gradient. There are two colors (c1 and c2) and
the outside c1 is 5 stitches wide, then a 1 stitch c2, 4 stitches c1, 2
stitches c2... It looks something like this:

RRRRRBRRRRBBRRRBBBRRBBBBRBBB
RRRRBRRRRBBRRRBBBRRBBBBRBBBB
RRRBRRRRBBRRRBBBRRBBBBRBBBBB
RRBRRRRBBRRRBBBRRBBBBRBBBBBY
RBRRRRBBRRRBBBRRBBBBRBBBBBYB
BRRRRBBRRRBBBRRBBBBRBBBBBYBB
RRRRBBRRRBBBRRBBBBRBBBBBYBBB
RRRBBRRRBBBRRBBBBRBBBBBYBBBB
RRBBRRRBBBRRBBBBRBBBBBYBBBBY
RBBRRRBBBRRBBBBRBBBBBYBBBBYY
BBRRRBBBRRBBBBRBBBBBYBBBBYYB
BRRRBBBRRBBBBRBBBBBYBBBBYYBB
RRRBBBRRBBBBRBBBBBYBBBBYYBBB
RRBBBRRBBBBRBBBBBYBBBBYYBBBY
RBBBRRBBBBRBBBBBYBBBBYYBBBYY
BBBRRBBBBRBBBBBYBBBBYYBBBYYY
BBRRBBBBRBBBBBYBBBBYYBBBYYYB
BRRBBBBRBBBBBYBBBBYYBBBYYYBB
RRBBBBRBBBBBYBBBBYYBBBYYYBBY
RBBBBRBBBBBYBBBBYYBBBYYYBBYY
BBBBRBBBBBYBBBBYYBBBYYYBBYYY
BBBRBBBBBYBBBBYYBBBYYYBBYYYY
BBRBBBBBYBBBBYYBBBYYYBBYYYYB
BRBBBBBYBBBBYYBBBYYYBBYYYYBY
RBBBBBYBBBBYYBBBYYYBBYYYYBYY
BBBBBYBBBBYYBBBYYYBBYYYYBYYY
BBBBYBBBBYYBBBYYYBBYYYYBYYYY
BBBYBBBBYYBBBYYYBBYYYYBYYYYY

It goes on and on like that and when one color ends, another begins.
When two sets of gradients meet, there is a thick separator. Two
gradients don't always meet at the same color, but their opposite
borders are usually the same. (ex: black-to-yellow |separator|
white-to-black) There is also the occasional gradient of thick bars of
equal length; ex: |green|-|yellow|-|red|. It looks like this:

Photo: http://www1.istockphoto.com/file_thumbview_approve/2544046/2/

So the challenge is to make a pattern generator to generate the patterns
as seen in the ASCI and picture. It should, or rather NEEDS to, contain
the Mexican flag as it is respectful to the culture where this challenge
comes from. For extra credit, try to put them on a blanket of 200x100
pexels. And if you really need extra credit to graduate, make the
patterns symmetrical, however make the colors in the patterns NOT
symmetrical (ex: WWRW middle OBOO).

Have fun,

marc
-- 
······@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org