Coordinates and simple graphs

Coordinate geometry provides a way to visualize relationships expressed as mathematical functions or equations. This section will review some things you'd have covered in your school math classes, but mixed with a lot of ActionScript code to emphasize the application of those math concepts.

To get started, let's remember how to plot functions on graphs. Say you want to plot the graph of the function y = x2. The first thing you must do is to decide what range of values you want to plot. Suppose you want x to range from –4 to 4. Then what you might have done at school is to tabulate the values of x and the corresponding values of y that you get by using y = x2. The next thing you might have done is to plot each (x, ...

Get The Essential Guide to Physics for Flash Games, Animation, and Simulations now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.