(*^ ::[ frontEndVersion = "Macintosh Mathematica Notebook Front End Version 2.1"; macintoshStandardFontEncoding; paletteColors = 128; automaticGrouping; currentKernel; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e8, 24, "Times"; ; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e6, 18, "Times"; ; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, e6, 14, "Times"; ; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, a20, 18, "Times"; ; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, a15, 14, "Times"; ; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, a12, 12, "Times"; ; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; ; fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L-5, 12, "Courier"; ; fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ; fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, R65535, L-5, 12, "Courier"; ; fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ; fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, B65535, L-5, 12, "Courier"; ; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, 12, "Courier"; ; fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, 10, "Geneva"; ; fontset = header, inactive, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = leftheader, inactive, L2, 12, "Times"; ; fontset = footer, inactive, noKeepOnOnePage, preserveAspect, center, M7, 12, "Times"; ; fontset = leftfooter, inactive, L2, 12, "Times"; ; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; ; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; ] :[font = special1; inactive; preserveAspect; ] Colors in Mathematica Mathematica uses the RED-GREEN-BLUE system of describing colors. A color is formulated by the procedure RGBColor[red, green, blue ] with three parameters, each between zero and one (inclusive) and each specifying the amounts of one of the three basic colors -- red, green, and blue. The color RGBColor[1, 1, 1] is white and the color RGBColor[0, 0, 0] is black. The first cell below draws a single colored rectangle. Notice how the rectangle's color is specified. Evaluate the next cell. Then try some experiments changing the rectangle's color. ;[s] 17:0,1;56,2;67,0;69,3;80,0;91,1;105,0;178,1;187,2;204,1;207,0;370,1;388,0;413,1;430,0;547,4;628,0;630,-1; 5:7,13,9,Times,0,12,0,0,0;6,13,9,Times,1,12,0,0,0;2,13,9,Times,3,12,0,0,0;1,13,9,Times,2,12,0,0,0;1,13,9,Times,1,12,65535,0,0; :[font = input; preserveAspect; ] ColoredBox := {RGBColor[1, 0, 0], Rectangle[{0, 0}, {1, 1}]} Graf := Graphics[ColoredBox] Show[Graphics[Graf], PlotRange -> {{0, 11}, {0, 11}}, AspectRatio -> Automatic, Axes -> True] :[font = special1; inactive; preserveAspect; ] The next cell generates a row of rectangles each with a different amount of red. Notice the way in which the rectangles' colors are specified. Evaluate the next cell and then experiment looking at shades of green and shades of blue. ;[s] 3:0,0;145,1;233,0;235,-1; 2:2,13,9,Times,0,12,0,0,0;1,13,9,Times,1,12,65535,0,0; :[font = input; preserveAspect; ] ColoredBoxes := Table[{RGBColor[x/10, 0, 0], Rectangle[{x, 0}, {x + 1, 1}]}, {x, 0, 10}] Graf := Graphics[ColoredBoxes] Show[Graphics[Graf], PlotRange -> {{0, 11}, {0, 11}}, AspectRatio -> Automatic, Axes -> True] :[font = special1; inactive; preserveAspect; ] The next cell generates a matrix of rectangles showing different combinations of red and green. Evaluate it now and then experiment showing different combinations of red and blue, and of blue and green. ;[s] 3:0,0;97,1;202,0;205,-1; 2:2,13,9,Times,0,12,0,0,0;1,13,9,Times,1,12,65535,0,0; :[font = input; preserveAspect; ] ColoredBoxes := Table[ Table[{RGBColor[x/10, y/10, 0], Rectangle[{x, y}, {x + 1, y + 1}]}, {x, 0, 10}], {y, 0, 10}] Graf := Graphics[ColoredBoxes] Show[Graphics[Graf], PlotRange -> {{0, 11}, {0, 11}}, AspectRatio -> Automatic, Axes -> True] :[font = special1; inactive; preserveAspect; ] The final cell generates a series of matrices like the red and green matrix above but adding increasing amounts of blue. Evaluate it now. ;[s] 3:0,0;122,1;137,0;140,-1; 2:2,13,9,Times,0,12,0,0,0;1,13,9,Times,1,12,65535,0,0; :[font = input; preserveAspect; ] Do[Show[Graphics[ Table[ Table[{RGBColor[x/10, y/10, z/10], Rectangle[{x, y}, {x + 1, y + 1}]}, {x, 0, 10}], {y, 0, 10}]], PlotRange -> {{0, 11}, {0, 11}}, AspectRatio -> Automatic, Axes -> True], {z, 0, 10}] ^*)