(*^ ::[ 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; ] Drawing Geometric Objects in Mathematica Mathematica uses several procedures to specify geometric objects. The cell below illustrates some of them. You may want to look at the Mathematica notebook on color to see how colors are specified. A rectangle is specified by the procedure Rectangle with two parametters -- the first parameter is the lower left corner of the rectangle and the second is its upper right corner. Notice that we can specify the color of a rectangle by putting the rectangle in a list with the color specified by the RGBColor procedure. A line is specified by the Line procedure with one parameter -- a list of two or more points to be connected by a line. Notice that we can color a line in exactly the same way that we color a rectangle. The thickness of a line can be specified by Thickness with one parameter -- the thickness of the line as a fraction of the total width of the graph. A polygon is specified by the Polygon procedure with one parameter -- a list of the vertices of the polygon in the order in which they are connected. The last point in the list is automatically connected to the first point. Notice that we can color a polygon in the same way as a line or rectangle. A point is specified by the Point procedure with one parameter -- a list of the point's two coordinates. The size of the point is specified by PointSize with one parameter -- the size of the point as a fraction of the total width of the graph. Notice that we can color a point in the usual way. Complex objects are specified as lists of the basic objects above, made into a "graphics object" with the Graphics procedure and then displayed with the Show procedure. The cell below gives some examples. Evaluate it now and then experiment on your own, making and displaying some interesting and fairly complex drawings. ;[s] 26:0,1;59,2;70,0;104,3;115,0;242,3;253,0;351,1;360,0;610,1;618,0;660,1;664,0;884,1;894,0;1022,1;1029,0;1324,1;1329,0;1442,1;1451,0;1704,1;1712,0;1753,1;1757,0;1808,4;1925,-1; 5:12,13,9,Times,0,12,0,0,0;10,13,9,Times,1,12,0,0,0;1,13,9,Times,3,12,0,0,0;2,13,9,Times,2,12,0,0,0;1,13,9,Times,1,12,65535,0,0; :[font = input; preserveAspect; ] Object1 := {RGBColor[1, 0, 0], Rectangle[{0, 0}, {1, 1}]} Object2 := {RGBColor[0, 0, 1], Line[{{1, 1}, {2, 0}}]} Object3 := {RGBColor[0, 1, 0], Polygon[{{2, 0}, {3, 1}, {4, 0}}]} Object4 := {PointSize[0.02], Point[{2, 2}]} Object5 := {PointSize[0.04], RGBColor[0, 0, 1], Point[{3, 3}]} Object6 := {PointSize[0.06], Point[{4, 4}]} Object7 := {RGBColor[1, 0, 1], Thickness[0.01], Line[{{0, 3}, {2, 5}, {4, 3}}]} Graf := Graphics[{Object1, Object2, Object3, Object4, Object5, Object6, Object7}] Show[Graphics[Graf], PlotRange -> {{0, 5}, {0, 5}}, AspectRatio -> Automatic, Axes -> True] ^*)