1. Getting Started

Legal Notice, Disclaimer, and Book Ordering Information:

Null

Setup

\(Clear["Global`*`"]; 
Off[General::spell]; 
Off[General::spell1]; 
    \)

<< "d:/Mma/Inits/ch1init.m"

1.6 Graphics

1.6.1  Animated Plots

v = 1; \(frames = 10; 

    Do[Plot[Cos[2\ π\ \((x - v\ t)\)], {x, \(-2\), 2}, 
        PlotRange -> {\(-2\), 2}], {t, 0, 1 - 1\/frames, 1\/frames}]; 
    \)

Contract plots, select contracted bar, and type Control-y to start animation (controls below).

1.6.2 Vector Field Plots

vector = {x, y}/((((x^2) + (y^2)))^(3/2))

Needs["Graphics`PlotField`"];

Arrows proportional to variable size

PlotVectorField[vector, {x, -5, 5, 2}, {y, -5, 5, 2}];

Arrows of constant length (or absent if variable is too small).

PlotVectorField[vector, {x, -5, 5, 2}, {y, -5, 5, 2}, 
      Graphics`Common`GraphicsCommon`ScaleFunction -> (1&)];

Arrows of constant length with color depending on variable size

\(\(PlotVectorField[vector, {x, \(-5\), 5, 2}, {y, \(-5\), 5, 2}, 
      Graphics`Common`GraphicsCommon`ScaleFunction -> \((1&)\)
	, 
      ColorFunction -> Hue]; \)\)