Re: Building lists

*To*: mathgroup at smc.vnet.net*Subject*: [mg22340] Re: [mg22312] Building lists*From*: BobHanlon at aol.com*Date*: Fri, 25 Feb 2000 21:13:32 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

Needs["Graphics`Colors`"]; colorList = {Blue, Red, Purple, Plum, Gold, Olive, Pink, Navy, Mint, Black}; nmax = Length[colorList]; Show[Graphics[ Table[{colorList[[n]], Disk[{0, 0}, 20(nmax - n + 1)]}, {n, nmax}]], AspectRatio -> 1]; or equivalently, Show[Graphics[{colorList[[#]], Disk[{0, 0}, 20(nmax - # + 1)]} & /@ Range[nmax]], AspectRatio -> 1]; If a list of specific colors is not required, then use a color function: Show[Graphics[ Table[{Hue[2(nmax - n)/(nmax - 1)], Disk[{0, 0}, 20(nmax - n + 1)]}, {n, nmax}]], AspectRatio -> 1]; Bob Hanlon In a message dated 2/24/2000 4:32:53 AM, tdevries at shop.westworld.ca writes: >The graphics command below builds a simple bull's eye. (I used it for a >probability question in my math class) It does what I want it to, but >with >all the repetition I know that it is probably possible to do it more simply. > It isn't so long but I figured I could learn something by seeing how this >command could be duplicated in different ways. I was looking at Thread >but >couldn't quite manage to get things to work out. The specific colors >aren't really important, but I did want to get each disk to be a different >color. >