(*^
::[ Information =
"This is a Mathematica Notebook file. It contains ASCII text, and can be
transferred by email, ftp, or other text-file transfer utility. It should
be read or edited using a copy of Mathematica or MathReader. If you
received this as email, use your mail application or copy/paste to save
everything from the line containing (*^ down to the line containing ^*)
into a plain text file. On some systems you may have to give the file a
name ending with ".ma" to allow Mathematica to recognize it as a Notebook.
The line below identifies what version of Mathematica created this file,
but it can be opened using any other version as well.";
FrontEndVersion = "Macintosh Mathematica Notebook Front End Version 2.2";
MacintoshStandardFontEncoding;
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, preserveAspect, groupLikeInput, M42,
N23, bold, B65535, L-5, 12, "Courier";
fontset = output, output, inactive, noPageBreakInGroup, preserveAspect,
groupLikeOutput, M42, N23, L-5, 12, "Courier";
fontset = message, inactive, noPageBreakInGroup, preserveAspect,
groupLikeOutput, M42, N23, R65535, L-5, 12, "Courier";
fontset = print, inactive, noPageBreakInGroup, preserveAspect,
groupLikeOutput, M42, N23, L-5, 12, "Courier";
fontset = info, inactive, noPageBreakInGroup, preserveAspect,
groupLikeOutput, M42, N23, B65535, L-5, 12, "Courier";
fontset = postscript, PostScript, formatAsPostScript, output, inactive,
noPageBreakInGroup, 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";
currentKernel;
]
:[font = smalltext; inactive; preserveAspect]
Copyright (C) 1997 Rich Neidinger, John Swallow, and Todd Will. Free for
distribution to college and university instructors for personal,
non-commercial use. If these notebooks are used in a course, the authors
request $20 per student.
:[font = title; inactive; preserveAspect]
Chapter IX. Special Topics
:[font = title; inactive; preserveAspect]
27. Fits and Graphics
:[font = smalltext; inactive; preserveAspect]
Last revision: October 16 1996
:[font = text; inactive; preserveAspect]
In this last section, we explore Mathematica's graphics commands and "Fit[
]" function.
:[font = section; inactive; Cclosed; preserveAspect; startGroup]
Fits
:[font = subsection; inactive; Cclosed; preserveAspect; startGroup]
Back in the Classroom
:[font = text; inactive; preserveAspect]
Suppose, as we did earlier in the course, that an instructor likes to ask
students in a class for answers to homework questions. If the instructor
asks for answers to "n" questions, and there are "m" students in the class,
how many different students are likely to be called on? We can attempt to
decide by writing a Mathematica function which mimics this classroom
situation.
:[font = input; preserveAspect]
roster={"Andrews","Biber","Chase","Cowles",
"Dearing","Elzayadi","Ferrentino","Hsieh","Jones",
"Kavanagh","Minlend","Montague","Peay","Smith",
"Sparks","Stovesand","Symes","Talvacchio"};
numStudents = Length[roster];
Clear[draw,numQuestions]
draw[numQuestions_] := Length[
Union[
Table[
roster[[ Random[Integer,{1,numStudents}] ]],
{numQuestions}
]
]
]
Clear[aveDraw,numCalled,trials]
aveDraw[numCalled_,trials_] :=
N[ Sum[draw[numCalled],{trials}]/trials ]
:[font = text; inactive; preserveAspect]
The numeric answer may be interesting in its own right, but we may learn
more about the function by finding a graphical representation of the
function. We can do so by using "ListPlot[ ]". We'll plot the number of
questions asked on the x-axis and the resulting average number of different
students called upon on the y-axis.
:[font = input; preserveAspect]
aveData = Table[
{numQuestions, aveDraw[numQuestions,5]},
{numQuestions,1,100}] ;
:[font = input; preserveAspect]
dataPlot = ListPlot[aveData]
:[font = text; inactive; preserveAspect]
Unfortunately, on some monitors, the default plot size makes the points too
small to see. If this is true on your monitor, read the rest of the
paragraph; otherwise, you may want to skip it. One solution is to use the
option "Prolog->PointSize[.02]" in the "ListPlot[ ]" call (making it a
final parameter), but we must keep in mind that the "PointSize" parameter
affects different monitors and printers to differing amounts, so that if
we're not careful, the points will print out much larger than they appear
on the screen. Another solution is simply to expand the graphic: click on
the graphic, grab a corner, and drag it to a larger size. (Note: graphics
take up lots of space in on your disk, so you may want to delete cells with
graphics before saving.)
:[font = text; inactive; preserveAspect; endGroup]
After looking at a plot of the data, we may believe that some function
approximates the values. We search for such a function below.
:[font = subsection; inactive; Cclosed; preserveAspect; startGroup]
Finding an Analytic Function to Match the Data
:[font = text; inactive; preserveAspect]
What we'd like to do now is "fit" a curve or function to the data in the
list "aveData". In other words, we would like to determine an analytic
function, say polynomial, trigonometric, or otherwise, which will match the
data points we have. We might use the function later to guess what some
values of data would be, say with a number of questions too large to give
to our "aveDraw" function. The Mathematica function needed is the function
"Fit[ ]".
:[font = input; preserveAspect]
?Fit
:[font = text; inactive; preserveAspect]
We'll feed the Fit function our list of x-y pairs, a list of "building
functions", and the variable we want to use for the function. Mathematica
is allowed to choose any sum of any multiples of the function when finding
the "best fit"; i.e., if the building functions are "{f[x], g[x], h[x]}",
then "Fit[ ]" finds the best curve of the form "a f[x] + b g[x] + c h[x]",
where "a", "b", and "c" are numbers.
:[font = input; preserveAspect]
fitter[x_] = Fit[aveData,{1,x,x^2},x]
:[font = text; inactive; preserveAspect]
Here, given building functions "1", "x", and "x^2", the "Fit[ ]" command
finds the best coefficients of all possible curves of the form a*(1) +
b*(x) + c*(x^2), i.e. of all possible parabolas. When your instructor ran
this command the result was the sum of 3.82261*(1), .450069*(x), and
-.00305751*(x^2). You may find slightly different results because we used
the "Random[]" function in creating the list "aveData". Let's look at the
plot.
:[font = input; preserveAspect]
fitterPlot = Plot[ fitter[x],{x,1,100}]
:[font = text; inactive; preserveAspect]
This doesn't look too much like our previous plot, but one problem is that
not the entire graph was shown. To see the complete graph we need to add
the option "PlotRange->All".
:[font = input; preserveAspect]
Clear[fitterPlot]
fitterPlot = Plot[fitter[x],{x,1,100},
PlotRange->All]
:[font = text; inactive; preserveAspect]
This looks a little closer, but let's see how it holds up when we show the
function and the data together.
:[font = input; preserveAspect]
Show[fitterPlot,dataPlot]
:[font = text; inactive; preserveAspect]
That's not too bad, but we can do better by giving the "Fit[ ]" command
more "building functions" with which to construct the approximating
function.
:[font = input; preserveAspect]
Clear[fitter,fitterPlot]
:[font = input; preserveAspect]
fitter[x_]=Fit[aveData,{1,x,x^2,x^3},x]
:[font = input; preserveAspect]
fitterPlot=Plot[ fitter[x],{x,1,100},
PlotRange->All]
:[font = input; preserveAspect]
Show[fitterPlot,dataPlot]
:[font = text; inactive; preserveAspect]
The real trick to using the "Fit[ ]" function is in finding good building
functions to use. By doing many experiments, one finds that the "Fit[ ]"
function does very well when given {1,x,1/(x+20)} as building functions.
:[font = input; preserveAspect]
Clear[fitter,fitterPlot]
fitter[x_]=Fit[aveData,{1,x,1/(x+20)},x]
fitterPlot=Plot[fitter[x],{x,1,100},
DisplayFunction->Identity]
Show[dataPlot,fitterPlot,
DisplayFunction->$DisplayFunction]
:[font = text; inactive; preserveAspect; endGroup; endGroup]
Note: the option "DisplayFunction->Identity" suppresses the output of the
"Plot[ ]" function,
and "DisplayFunction->$DisplayFunction" forces the output to appear.
(Sometimes this last expression is unnecessary, but remembering to use it
when "DisplayFunction->Identity" is used is wise.)
:[font = section; inactive; Cclosed; preserveAspect; startGroup]
Graphics, Primitives
:[font = subsection; inactive; Cclosed; preserveAspect; startGroup]
Showing by Doing, Doing by Showing
:[font = postscript; PostScript; formatAsPostScript; output; inactive;
preserveAspect; pictureLeft = 35; pictureWidth = 440; pictureHeight = 389]
%!
%%Creator: Mathematica
%%AspectRatio: .88889
MathPictureStart
%% Graphics
/Courier findfont 10 scalefont setfont
% Scaling calculations
0.12963 0.42328 0.021164 0.42328 [
[(0.5)] .34127 .02116 0 2 Msboxa
[(1)] .55291 .02116 0 2 Msboxa
[(1.5)] .76455 .02116 0 2 Msboxa
[(2)] .97619 .02116 0 2 Msboxa
[(0.5)] .11713 .2328 1 0 Msboxa
[(1)] .11713 .44444 1 0 Msboxa
[(1.5)] .11713 .65608 1 0 Msboxa
[(2)] .11713 .86772 1 0 Msboxa
[ -0.001 -0.001 0 0 ]
[ 1.001 .88989 0 0 ]
] MathScale
% Start of Graphics
1 setlinecap
1 setlinejoin
newpath
[ ] 0 setdash
0 g
p
p
.002 w
.34127 .02116 m
.34127 .02741 L
s
P
[(0.5)] .34127 .02116 0 2 Mshowa
p
.002 w
.55291 .02116 m
.55291 .02741 L
s
P
[(1)] .55291 .02116 0 2 Mshowa
p
.002 w
.76455 .02116 m
.76455 .02741 L
s
P
[(1.5)] .76455 .02116 0 2 Mshowa
p
.002 w
.97619 .02116 m
.97619 .02741 L
s
P
[(2)] .97619 .02116 0 2 Mshowa
p
.001 w
.17196 .02116 m
.17196 .02491 L
s
P
p
.001 w
.21429 .02116 m
.21429 .02491 L
s
P
p
.001 w
.25661 .02116 m
.25661 .02491 L
s
P
p
.001 w
.29894 .02116 m
.29894 .02491 L
s
P
p
.001 w
.3836 .02116 m
.3836 .02491 L
s
P
p
.001 w
.42593 .02116 m
.42593 .02491 L
s
P
p
.001 w
.46825 .02116 m
.46825 .02491 L
s
P
p
.001 w
.51058 .02116 m
.51058 .02491 L
s
P
p
.001 w
.59524 .02116 m
.59524 .02491 L
s
P
p
.001 w
.63757 .02116 m
.63757 .02491 L
s
P
p
.001 w
.67989 .02116 m
.67989 .02491 L
s
P
p
.001 w
.72222 .02116 m
.72222 .02491 L
s
P
p
.001 w
.80688 .02116 m
.80688 .02491 L
s
P
p
.001 w
.84921 .02116 m
.84921 .02491 L
s
P
p
.001 w
.89153 .02116 m
.89153 .02491 L
s
P
p
.001 w
.93386 .02116 m
.93386 .02491 L
s
P
p
.001 w
.0873 .02116 m
.0873 .02491 L
s
P
p
.001 w
.04497 .02116 m
.04497 .02491 L
s
P
p
.001 w
.00265 .02116 m
.00265 .02491 L
s
P
p
.002 w
0 .02116 m
1 .02116 L
s
P
p
.002 w
.12963 .2328 m
.13588 .2328 L
s
P
[(0.5)] .11713 .2328 1 0 Mshowa
p
.002 w
.12963 .44444 m
.13588 .44444 L
s
P
[(1)] .11713 .44444 1 0 Mshowa
p
.002 w
.12963 .65608 m
.13588 .65608 L
s
P
[(1.5)] .11713 .65608 1 0 Mshowa
p
.002 w
.12963 .86772 m
.13588 .86772 L
s
P
[(2)] .11713 .86772 1 0 Mshowa
p
.001 w
.12963 .06349 m
.13338 .06349 L
s
P
p
.001 w
.12963 .10582 m
.13338 .10582 L
s
P
p
.001 w
.12963 .14815 m
.13338 .14815 L
s
P
p
.001 w
.12963 .19048 m
.13338 .19048 L
s
P
p
.001 w
.12963 .27513 m
.13338 .27513 L
s
P
p
.001 w
.12963 .31746 m
.13338 .31746 L
s
P
p
.001 w
.12963 .35979 m
.13338 .35979 L
s
P
p
.001 w
.12963 .40212 m
.13338 .40212 L
s
P
p
.001 w
.12963 .48677 m
.13338 .48677 L
s
P
p
.001 w
.12963 .5291 m
.13338 .5291 L
s
P
p
.001 w
.12963 .57143 m
.13338 .57143 L
s
P
p
.001 w
.12963 .61376 m
.13338 .61376 L
s
P
p
.001 w
.12963 .69841 m
.13338 .69841 L
s
P
p
.001 w
.12963 .74074 m
.13338 .74074 L
s
P
p
.001 w
.12963 .78307 m
.13338 .78307 L
s
P
p
.001 w
.12963 .8254 m
.13338 .8254 L
s
P
p
.002 w
.12963 0 m
.12963 .88889 L
s
P
P
0 0 m
1 0 L
1 .88889 L
0 .88889 L
closepath
clip
newpath
p
p
1 0 0 r
.12963 .02116 m
.55291 .02116 L
.55291 .44444 L
F
P
p
.628 .126 .941 r
.004 w
.12963 .44444 m
.12963 .44444 .10582 0 365.73 arc
F
P
p
1 1 0 r
.004 w
newpath
.55291 .44444 .10582 0 365.73 arc
s
P
p
.855 .647 .126 r
[ .01 ] 0 setdash
.004 w
.12963 .44444 m
.55291 .02116 L
.97619 .44444 L
.55291 .86772 L
.12963 .44444 L
s
P
p
[(Soda Shop or Cosmic Coffee?)] .55291 .65608 0 0 Mshowa
P
P
% End of Graphics
MathPictureEnd
:[font = text; inactive; preserveAspect]
We will build up the pieces of this picture one at a time and then use
"Show[ ]" to display them at the same time. First, we must tell
Mathematica that we will need the package of color definitions. This
command should be executed only once, before any other cells using color
names are executed, so that no color names will be defined in the "Global`"
context before these definitions are executed.
:[font = input; preserveAspect]
Needs["Graphics`Colors`"]
:[font = text; inactive; preserveAspect]
If we want to see all the colors we can use, we can execute the following cell.
:[font = input; preserveAspect]
?Graphics`Colors`*
:[font = text; inactive; preserveAspect]
In order to create the red triangle, we will use our first graphics
primitive. A graphics primitive is a symbolic graphics command, which for
2-dimensional graphics are chosen from "Point[ ]", "Line[ ]", "Rectangle[
]", "Polygon[ ]", "Circle[ ]", "Disk[ ]", "Raster[ ]", and "Text[ ]". We
will also use a graphics directive, which for us will either be a color
command or a "dashing instruction", which we will define below. The
difference between primitives and directives lies in the fact that graphics
primitives describe particular geometric objects,while graphics directives
specify only characteristics of succeeding primitives. If we place
graphics primitives and directives together in a list, the graphics
directives set the characteristics for all succeeding primitives (unless
another directive which negates the action is encountered). After we
create a list of primitives and directives, we will need two commands which
will actually create the graphics based on the commands in our list. One
command is needed for each of the two stages of the process. The first
command, "Graphics[ ]", converts graphics directives and primitives into
Mathematica's own internal commands for the graphics. However, this
command does not display the graphics. The second command, "Show[ ]",
takes the internal commands created by "Graphics[ ]" and actually displays
them in a cell. It is important that we store the result of "Graphics[ ]",
these internal commands, in some variable, so that we can execute"Show[ ]"
with this variable as a parameter.
;[s]
5:0,0;59,1;77,0;307,1;325,0;1559,-1;
2:3,13,9,Times,0,12,0,0,0;2,13,9,Times,2,12,0,0,0;
:[font = text; inactive; preserveAspect]
We build up the picture as follows. Our red triangle is formed by first
issuing the graphics directive "Red", followed by the graphics primitive
"Polygon[ ]", which takes as its argument a list of x-y pairs, thought of
as the vertices of the polygon.
:[font = input; preserveAspect]
redTriangle=Graphics[{Red,Polygon[{{0,0},{1,0},{1,1}}]}]
:[font = text; inactive; preserveAspect]
We'll now define a disk (a filled-in circle) and a circle. These
primitives require two arguments, an x-y pair, followed by the radius of
the circle.
:[font = input; preserveAspect]
purpleDisk=Graphics[{Purple,Disk[{0,1},.25]}]
:[font = input; preserveAspect]
yellowCircle=Graphics[{Yellow,Circle[{1,1},.25]}]
:[font = text; inactive; preserveAspect]
We may display any combination of our primitives now by using the "Show[ ]"
command.
:[font = input; preserveAspect]
Show[redTriangle, purpleDisk, yellowCircle]
:[font = text; inactive; preserveAspect]
Our primitives appear squashed because of the default "aspect ratio", which
forces the "y" axis to be scaled in accordance with "x". To circumvent
this, we can tell Mathematica to figure out the correct aspect ratio to
display x-y points with even scaling in the x and y directions, using the
option "AspectRatio->Automatic".
:[font = input; preserveAspect]
Show[redTriangle, purpleDisk, yellowCircle,
AspectRatio->Automatic
]
:[font = text; inactive; preserveAspect]
Now we will construct a box, where the lines are not solid but are
"dashed", using a separate graphics directive "Dashing[ ]". This directive
requires as arguments a list of lengths for the dashed segments of the
line; the list will be repeated over and over to determine the length of
each dashed piece. Giving "Dashing[ ]" a list with one element, then,
specifies that the dashing segments will all be of the same length. Our
graphics primitive is "Line[ ]", which requires a list of x-y pairs to
connect; note that we close off the list with the same point we began with.
:[font = input; preserveAspect]
box=Graphics[{Goldenrod,Dashing[{.01}],
Line[{{0,1},{1,0},{2,1},{1,2},{0,1}}]}]
:[font = text; inactive; preserveAspect]
Finally we introduce some text, using the graphics primitive "Text[ ]",
which takes as arguments a string to be printed and an x-y pair describing
the coordinate at which the text should be centered.
:[font = input; preserveAspect]
tagLine=Graphics[{Text["Soda Shop or Cosmic Coffee?",{1,1.5}]}]
:[font = text; inactive; preserveAspect]
Voila!
:[font = input; preserveAspect; endGroup]
masterPiece = Show[
redTriangle,purpleDisk,yellowCircle,box,tagLine,
Axes->True,
AspectRatio->Automatic
]
:[font = subsection; inactive; Cclosed; preserveAspect; startGroup]
Adding Plots to Graphics
:[font = text; inactive; preserveAspect]
Suppose we want to add the graphics resulting from a plot command to a
picture we have built up using graphics primitives. We need only capture
the internal representations of the graphics, by assigning the results of
the "Graphics[ ]" command and the "Plot[ ]" or "ListPlot[ ]" command to
separate variables, and we then use "Show[ ]" to display all of the
graphics together.
:[font = input; preserveAspect]
sine = Plot[1+Sin[Pi x],{x,0,2}]
:[font = text; inactive; preserveAspect]
This command actually shows the graph, but remember that we can suppress
the immediate display by using the "DisplayFunction->Identity" option.
Remember to use "DisplayFunction-> $DisplayFunction" with the "Show[ ]"
command.
:[font = input; preserveAspect]
minusSine = Plot[1-Sin[Pi*x],{x,0,2},
DisplayFunction->Identity]
:[font = input; preserveAspect; endGroup]
Show[masterPiece, sine, minusSine,
DisplayFunction->$DisplayFunction]
:[font = subsection; inactive; Cclosed; preserveAspect; startGroup]
Adding Graphics to Plots
:[font = text; inactive; preserveAspect]
Alternatively, we can attempt to add graphics to the result of the "Plot[
]" command. We can do so using the options "Prolog[ ]" or "Epilog[ ]",
which provide "Plot[ ]" with some graphics primitives it must display both
before and after the original plot. We do not need to use the "Graphics[
]" function.
:[font = input; preserveAspect]
Plot[1+Sin[Pi x],{x,0,2},
Epilog->
{Purple,
Disk[{0,1},.25],
Red,
Circle[{1,1},.25]}
]
:[font = text; inactive; preserveAspect]
Let's change "Epilog" to "Prolog". Is there a difference? Why?
:[font = input; preserveAspect; endGroup]
Plot[1+Sin[Pi x],{x,0,2},
Prolog->
{Purple,
Disk[{0,1},.25],
Red,
Circle[{1,1},.25]}
]
:[font = subsection; inactive; Cclosed; preserveAspect; startGroup]
Further Study
:[font = text; inactive; preserveAspect]
The wealth of graphics primitives and directives is too large for us to
consider exhaustively here. However, here are some tips you may wish to
remember when using "Plot[ ]" or some other plot command.
:[font = text; inactive; preserveAspect]
The option "PlotStyle->{ }" provides a way for graphics directives to be
issued before a function is plotted. If the list contains sublists, then
sublists of directives are used, one at a time, for each function. To plot
"x^2" in red and "x^3" in green, then, we could issue the command
"Plot[{x^2,x^3},PlotStyle->{{Red},{Green}}]".
:[font = text; inactive; preserveAspect]
Other directives include "GrayLevel[ ]", for gray-scale "color", and
"Thickness[ ]", to alter the widths of the lines drawn.
:[font = text; inactive; preserveAspect]
Options for plot commands also include "Axes->boolean" to decide whether or
not to draw the axes; "GridLines->..." for drawing gridlines, and
"PlotLabel->"text"" to assign a label to the plot. Consult "Options[Plot]"
for more information.
:[font = text; inactive; preserveAspect; endGroup; endGroup]
Finally, Mathematica easily plots three-dimensional graphs using 3-D
graphics primitives and "Graphics3D[ ]". Consult Introduction to
Programming with Mathematica, chapter 10, or the Mathematica reference
manual, for further study.
;[s]
3:0,0;119,1;163,0;233,-1;
2:2,13,9,Times,0,12,0,0,0;1,13,9,Times,2,12,0,0,0;
^*)