Introduction to Programming with Mathematica, Third Edition

Chapter 9: Graphics Programming

Mathematica contains a rich set of tools for visualizing functions and data. Generally the built-in graphics functions will provide what you need, but, just like the rest of the Mathematica programming language, you will periodically find yourself with the need to create your own plotting and visualization routines. In this chapter we will discuss how to construct graphical images using Mathematica, and how to write programs that solve problems that are graphical in nature.

9.1 Structure of graphics

All Mathematica graphics are constructed from objects called graphics primitives. These primitive elements ( Point, Line, Polygon, Circle, etc.) are used by built-in functions such as Plot to create graphics. Although it is quite straightforward to create images using Mathematica's built-in functions, you will frequently find yourself having to create a graphic image for which no Mathematica function exists. This is analogous to the situation in programming where you often have to write a specialized procedure to solve a particular problem. We use the basic building blocks and put them together according to the rules governing the structure of the language and the nature of the problem at hand. In this section we will look at the building blocks of graphics programming and at how we put them together to make graphics.

Primitives, directives, and options

Graphics created with functions such as Plot and ListPlot are constructed of lines connecting points, with options governing the display. We can get some insight...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Graphics Software
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.