Sunday, September 24, 2006

Physics 20 Reading List #1

Welcome to Physics 20!

Physics 20 lab is all about finding an efficient, harmonious, and fun way
of bringing together the ideas of physics, the tools of computer
science, and the methods of numerical analysis.

In this lab you will study
- Physics: You will solve simple physics problems
that are not easily done using pencil and paper.
- Programming: You will gain valuable experience in programming and debugging techniques.
- Numerical methods: You will learn the basics of effective methods for solving mathematical problems such as performing integrals or solving ordinary differential equations.

In this lab, you start discovering a productive and enjoyable way for
you to use computers to do quantitative science; later in your career
you will find that you have built up a toolbox of tools and techniques
with which you are comfortable, and that can be useful in many
occasions. Just which particular tools and techniques you have
acquired will depend partly on contingency (such as your taste and
mine), but nevertheless they will suit your style of doing
computations, and they will serve you well.

This week we have readings about the practicalities of working with emacs and with three graphing applications (xmgrace, gnuplot, and Mathematica; pick one), and about working with C++.

1. Emacs

The best emacs tutorial comes with the program itself (just type 'CTRL-h' and then 't'). But see also the emacs wiki, and this tutorial. We have also a good emacs book in the physlab library, Learning GNU Emacs, by D. Cameron, B. Rosenblatt, E. S. Raymond (O'Reilly, Sebastopol, CA, 1996).

2. Graphing

This week's assignment will introduce you to some graphing tools. The first tool, xmgrace has a useful and intuitive menu-driven interface. The second, gnuplot, has a command-line interface and is somewhat easier to automate the generation of a set of similar graphs. The third tool is Mathematica, which has a full range of graphing capabilities as well as access to a huge set of functions. See this link for some information on all these tools and some hints on how to use them.

2a. Graphing with xmgrace

This is the tool I use to create 2D graphs in my research. It is very powerful and has easy-to-use menus that can produce high-quality graphs with little effort. Its documentation is somewhat incomplete, but its possible to figure out much just by playing around with the menus. See the tutorial and the user's guide at the Grace homepage, and also see this link for some hints.

2b. Graphing with gnuplot

Don't waste time with the gnuplot manual, whose logic is counterintuitive at the best. See instead this tutorial from IBM; for tricks (which will be become necessary almost immediately; such is the nature of the tool), see this (Not so) FAQ.

2c. Graphing with Mathematica

The chief tool to plot data with Mathematica is ListPlot[]; the entire section 1.9 of the manual is also relevant. Mathematica can be a very powerful environment for graphics programming, where you write code to map your data structures directly into graphics primitives. For further information, look at section 2.10 of the manual.

3. Further information on Mathematica

You can find tutorials on Mathematica here. Mathematica is a very powerful environment for performing calculations, both numerical and symbolic.

4. Python help.

Python has quite fine documentation: http://www.python.org/ If you are relatively new to programming, it should be rewarding to read Chap 1-5 of the online tutorial.

5. C++ help.

You may use C++ for this week's and future assignments. A C++ tutorial can be found here. Bjarne Stroustroup, the creator of C++, has a C++ FAQ that you may find helpful. A good general book on C++ is Steve Oualline's Practical C++ Programming. An extremely useful (but more advanced) book on C++ style and techniques is Effective C++ by Scott Meyers.

0 Comments:

Post a Comment

<< Home