Legal Notice, Disclaimer, and Book Ordering Information:

(* Legal Notice, Disclaimer, and Book Ordering Information:

Last Modified: FIO January 1, 1995

Mathematica For Physics
Robert L. Zimmerman and Fredrick I. Olness
MathSource Number: 0206-862 

ISBN 0-201-53796-6
For ordering information, call 1-800-822-6339
Addison-Wesley Publishing Company

Communication with the authors:
Fredrick I. Olness:  olness@mail.physics.smu.edu
Robert L. Zimmerman: bob@zim.uoregon.edu

Copyright 1995, Addison-Wesley Publishing Company, Inc. The material in
this file may be distributed freely  so long as the content remains
unchanged, and the copyright and  reference notices are included. The
publisher grants permission for the noncommercial use of these programs
and program segments.  All other uses require the prior written consent
of the publisher.    

All rights are reserved with regard to the  material in the
"Mathematica For Physics" text, and may not be reproduced, stored in a
retrieval system, or transmitted,  in any form or by any means,
electronic, mechanical, photocopying,  recording, or otherwise, without
the prior written permission  of the publisher. 

The programs and applications presented in this book have been included
for  their instructional value. They have been tested with care but are
not  guaranteed for any particular purpose. The publisher does not
offer any  warranties or representations, nor does it accept any
liabilities with  respect to the programs or applications. 

 *)

Chapter 1, Section 6, Problem 1-6:   
Graphics

<<mainDir:subDir:ch1init.m  (* Mac  Version *)

<<mainDir/subDir/ch1init.m  (* Unix Version *)

6.  Graphics

Clear["Global`*"];

6.1  Animated Plots

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

6.2 Vector Field Plots

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

Needs["Graphics`PlotField`"];

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

6.3 Shadowing

Needs["Graphics`PlotField`"];
Needs["Graphics`PlotField3D`"];

Context[ScaleFunction]

PlotGradientField[1/Sqrt[x^2+y^2]
     ,{x,-5,5,2}
     ,{y,-5,5,2}
     ,ScaleFunction->(1&)
   ];

PlotGradientField[1/Sqrt[x^2+y^2]
     ,{x,-5,5,2}
     ,{y,-5,5,2}
     ,Graphics`PlotField`ScaleFunction->(1&)
   ];

6.5 Three-Dimensional Graphics

Plot3D[ Log[x^2+y^2] ,{x,-20,20},{y,-20,20}
      ,PlotPoints->35
      ,AspectRatio->1
      ,Boxed->False
      ,Axes->None  ];

6.6 Space Curve

coordinates= {Cos[2t+Pi/4 ], 2 Cos[2 t ], Cos[3 t]};

ParametricPlot3D[ Evaluate[coordinates]
                 ,{t,0,10 Pi}
                 ,PlotPoints-> 300];