mathematica画图指南(英文).pdf
开源计算机代数系统,可用于做符号计算,代数推导和编程,供大家学习ContentsPrefaceIXAcknowledgmentsXIX1 The Design of Mathematica's Graphics Commands1.1 Easy to Use1.2 General purpose1. 3 The Evolution of Mathematica's Graphics36792 Data Typ2.1 TwO-Dimensional Graphics Objects2.1.1 Graphics2.1.2 Graphicsarray2.2 Three-Dimensional Graphics Objects2. 3 Optimized Surface Graphics objects182.4 Mixed 2D and 3D Graphics Objects2.5 Print Forms of Graphics Objects,,232.6 Displaying Graphics obj252.6.1 Graphics Option Settings and Show252.6.2 What show rcally docs272.6.3 What Show returns2.6. 4 How Show Combines objects2.7 Graphics Type Conversions312.7.1 Conversion Quirks322.7. 2 Saving Time342. 8 Summary35vI contents3 Graphics Primitives and Directives373.1 Localization383.2 Primitives and Directives for 2D Graphics3.2.1 Color403.2.2 Points443.2.3 Lines and curves463.2.4 Filled Regions493.2.5 Text583.2.6 Postscript693.3 Primitives and Directives for 3D Graphics703.3.1 Colors3.3.2 Points3.3.3 Lines3.3.4 Cuboids3.3.5 Polygons3.4 Summary784 Commands for Producing graphics794.1 TwO-Dimensional Function Plotting804.1.1 Plot4.1.2 ParametricPlot854.1.3 Sampling864.1.4 No Plot974.2 Three-Dimensional function plotting.1024.2.1 Plot3d,,,1024.2.2 Parametricplot 3D1064.2.3 Options shared by plot 3d and ParametricPlot3D4,3 Mixed 2D and 3D Plots4.3.1 ContourPlot1144.3.2 Density Plot,1184.4 Plotting Data Sets: The listPlot Functions.1214.4.1 Listplot1224.4.2 Listplot3D1244.4.3 ListContourPlot and listDensity plot1274.5 Summary....1285 Graphics Packages1295.1 Working with Packages130CONTEN5.1.1 Loading a package1305.1.2 Package Names1325.1.3 Context1325.1.4 Forgetting to Load a Package,135Master Packages1372 A Sampling of graphics Package1405.2. 1 General graphics manipulations1425.2.2 Two-Dimensional graphics1525.2.3 Data Graphics1575. 2. 4 Three-Dimensional Graphics1655.2.5 Mixed 2D and 3D Graphics1715.2.6 Application areas1735.3 Summary1776 Coordinate systems1796.1 Two-Dimensional Graphics.,.1806.1.1 The coordinate systems1806.1.2 An Extended example...1856.1.3 Display of 2D Graphics1886. 2 Three-Dimensional Graphics1906.2.1 Coordinate Systems for Specifying Objects.1906.2.2 Coordinate Systems for Perspective projection1926.2.3 Coordinate Systems for Simulated Illumination1996.2.4 Converting Coordinates From Three to Two Dimensions6.3 Summary2037 Options2057. 1 Options used by all graphics functions2067.1.1 Options for Scaling Graphics2067.1.2 Options for Overlays and Underlays2187.1.3 Options for Axes2237.1.4 Options for Generating postscript Code2297.2 Additional Axis Options for 2D Graphics2377.3 Other 2D Graphics options2447.4 Options Used by All 3D Graphics2477.4.1 The Bounding Box2477.4.2 Polygon shading2527.4.3 Perspective Projection..261viiI contents7.5 Special 3D Graphics Options2677.5.1 Options for Graphics3D Objects2677.5.2 Options for Special 3D Graphics Types2697.5.3 Mesh Options for Surface and Density Graphics2727.5.4 Options for Contour Plots2747.5.5 Options for Surface Graphics2787.6 Options for Plotting Functions2807.6.1 Options Used by All Sampling Plot Functions2817.6.2 Options Controlling Two-Dimensional Adaptive Sampling2827.6.3 A Line style option for two-Dimensional plotters2846.4 A Special Option for ListPlot2857.7 Default Values for Graphics Options2857.8 Obsolete Graphics Options2877. 9 Option Manipulation2887.9.1 Commands for Reading Option Settings2897.9.2 Commands for Setting Options2947.9.3 Commands for Filtcring Options2967.10 Summary298Appendix: Code to Produce the Figures299A1 Graphics Primitives and DirectivesnooA. 2 The Loop301A. 3 The mathematica Ribbon303A. 4 The rotated text picture304A.5 Adaptive sampling pictures305A 5.1 Sampled points305A.5.2 Subdividing the Sampling Interval306A.5.3 Scaling for ax Bend307A6 Perspective projection pictures309A7 Thc Figurc for Specular Reflection..314Tables of Graphics Symbols317Suggested Readings327Index331Colophon341PrefaceMathematica is an exceptionally flexible and powerful tool for producing mathematicalgraphics. Mathematica makes it easy to create graphs of functions, plots of data,pictures of geometrical solids, and other mathematical illustrations either with built-infunctions or with simple programs of your own. This book tells you what you needto know to make the most of the graphics capabilities of Mathematica. Whether youare a beginner, an experienced user of Mathematica, or even someone who doesn'tuse mathematica at all but wants to use pictures produced by mathematica in yourpublications, you will find information in this book that will help you. This prefacewill help you figure out which parts of the book to read to find the information youneedThis book describes version 2.2 of mathematica, which is the current version at thetime of this writing. Early versions of Mathematica(1.03, 1.04, 1.1, and 1. 2) had muchmore limited graphics capabilities than Version 2 and later versions. The differencesare great enough that we decided it would not be practical to try to describe all versionsin this book. If you are using any level of Version 1 of Mathematica, we recommendthat you switch to the current versionWhy Cameron Wrote This bookI worked for Wolfram Research, Inc. for about two years, beginning in the spring of1988 when the first version of Mathematica was in its final stage of beta-testing, shortlybefore it was released to the public. My job was to get information about Mathematicaout to people who needed it, and to that end i gave presentations at conferences andtrade shows, wrote technical reports and other end-user documentation, and providedtechnical support to developers of Mathematica packages and other Mathematicarelated software. I was privileged to get glimpses of the exciting ideas that hundreds ofcreative and enthusiastic people were rushing to put into practice but i also saw at firsthand how the lack of complete, detailed documentation could hamper a promisingproject.X pREFACEDuring my tenure at WRi I also did a great deal of Mathematica programming, andI really came face-to-face with the information gap in the spring of 1989 when I wasasked to produce about 150 illustrations for a calculus textbook. The authors wanted tocreate a visually engaging text, and the publisher had agreed to use four-color printingnot just for a few plates, but for the entire book. This was a new idea in calculus textbookdesign, and the authors had many ideas for ways to use photographs, diagrams, andother visual aids to communicate the ideas of the calculus. They needed dozens ofattractive and accurate figures depicting plots of functions, curves, and surfaces, solidsof revolution, and other mathematical objects. Mathematica was an obvious choiceto make these illustrations, and the then-new version 1.2 with many new graphicsfeatures, promised to make the job easy and funWell, parts of it were fun, but none of it was easy! Even though i had by then readStephen Wolfram's book, Mathematica: A System for Doing Mathematics by Computer,from cover to cover several times I found that there were many features of mathematicagraphics that i just didn't understand until I tried to use them. Stephen couldntdocument every feature of every function without bloating his book to the size of theManhattan telephone directory, but keeping the book to a manageable length forcedhim to leave some odd corners of mathematica graphics unexplored, and I found thatI needed to explore them if i wanted to produce publication-quality graphics. If Ihadn't had access to the developers of Mathematica to get questions answered (andoccasionally, to get workarounds for bugs)I don't know whether I could have finishedthe projectWhen the idea of writing a book about Mathematica graphics was presented to me,I thought of that textbook project, and i determined to write the kind of book that Ished I had had then. Given a function to plot or an object to draw, it's easy to getMathematica to produce some graphical representation, but to get a particular imagethat makes a particular point you must simultaneously control coloring, lighting andshading, sampling, scaling, labeling, and all the other factors that go into producingan image with Mathematica. To do that you need a thorough understanding of howMathematica graphics are produced and a complete and detailed reference guide withplenty of practical examples to follow. That's what I've tried to give you in this bookWhy nancy Wrote This bookI developed an interest in computer graphics when I took a graduate-level course on thistopic from Leo Guibas at Stanford University during the winter of 1986. In the summerof 1988 I taught that course. At the end of the summer i went to the computer graphicsconference siggraPh, where I saw Stephen Wolfram demonstrate Mathematica. I wasPREFACE xifavorably impressed with the software, and subsequently went to work for WolframResearch, Inc, the developer of mathematicaIn 1989 I lett Wolfram Research to start my own company, Variable Symbols, Inc.to provide consulting and training in mathematical software. In 199 1 i wrote the tu-torial book Mathematica: A Practical Approach to help people learn to use Mathematicaeffectively. This book has been well received. Though I was already familiar withMathematica, I learned more about this software package when writing the bookWhen Cameron asked me in the fall of 1992 to join him as co-author of theMathematica Graphics Guidebook, I was delighted. Writing this book has given me anopportunity to learn more about Mathematica's graphics capabilities. I hope this bookenables you to take better advantage of Mathematica and spend less time fighting itHow This book was writtenSince the original reason for writing this book was the lack of documentation for manyfeatures of Mathematica graphics you won't be surprised to learn that we didn 't writethe book simply by referring to other printed sources. We started with stephen wolfram's book but whenever it was vague or unclear, or whenever we saw mathematicaproducing results that differed from what Stephen's book led us to expect, we pursuedother sources of information in an attempt to understand fully what was happening sothat we could explain it to you. We interviewed the developers at wolfram researchwho write and maintain the graphics code in mathematica, and we are grateful to them(especially Henry Cejtin and Tom Wickham-Jones) for their assistance in puzzling outthe rationale underlying Mathematica's graphics features. In a few cases we were evenvouchsafed a glimpse of Mathematica's source codeWe didnt stop there, either All the information we include in this book has beensubstantiated by extensive testing; on average, we created a dozen or more trial graphicsfor cach onc that appears in the book. We exercised somc hitherto unexplored aspects ofMathematica's graphics, including some undocumented features; in fact, we uncovereda few bugs in the program(or discrepancies in the documentation, depending on howyou look at it) in the course of doing experimental research for this bookFor this reason, the information here records the performance of mathematicawhat actually happened, whether or not we thought that was what was supposedto happen. If this book disagrees with other references on some point, it is safeto assume that the other book is describing what Mathematica was intended to doand this book describes what mathematica actually doesThis means, of course,that some of the odd phenomena documented here will (we hope) disappear infuture versions of Mathematica, as enhancements and bug fixes bring the performance of the program closer into line with the design specifications. As MathematicaXi1 prefaceevolves, this book may fall out of step with future versions, but for now, it is asaccurate and complete a description of Mathematica's graphics as you will find any-whereWho should read This bookAnyone who uses Mathematica can benefit from the information in this book. Forexample, scientists and engineers who work with large data sets find that a singlewell-designed plot is far more informative than a huge table of numbers. Teachers attempting to convey complicated ideas can capture students' attention by using still andanimated displays to enliven lectures handouts and textbooks. Researchers can turnabstruse concepts into pictures that make mathematics almost tangible, stimulatingthe imagination in ways that symbol manipulations never could. One of Mathemat-ica's greatest strengths is its smooth integration of symbolic, numerical, and graphicalcapabilities. Even if your work is primarily involved with numbers or formulas you willquickly come to appreciate the ability to translate your ideas into vivid and accuratemagesOf course, some people's primary reason for using Mathematica is its graphicalabilities. To be useful, a book or journal that treats topics in the sciences must haveillustrations that not only are appealing to the eye but also are faithful to the conceptsthey illustrate. Professional technical illustrators and production specialists find mathe-matica valuable for producing diagrams of geometric figures, graphs of functions, plotsof data sets, and other mathematical illustrations that are both beautiful and accurateAnd it is not only publishing professionals who need these capabilities. As desktoppublishing systems become more versatile and more faithful to the standards of finepublishing, more and more authors (including the authors of this book) are electing tocompose and typeset thcir own work. Mathematica is an excellent tool for preparingtechnical illustrations for publication, but anyone who uses it for that purpose willneed the information in this bookPerhaps youve never used mathematica before-maybe it was the prospect ofdrawing beautiful mathematical graphics that attracted your interest, and this bookis your first exposure to mathematica. Graphics programming is a good introductionto mathematica, or to programming in general, because there's a special satisfactionin getting a program correct and being rewarded with a beautiful picture. You canskim this book to get an idea of what you can accomplish with Mathematica, butbefore you begin programming you should read the introductory chapters and try outsome of the examples in Stephen Wolfram's book, Mathematica: A System for doingMathematics by Computer, which we refer to as"Thc Mathematica Book. You shouldkeep The mathematica Book at hand as you read this one so you can look up any
暂无评论