Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: Wave Simulations



It took less than ten minutes to program this in Excel. The key is to
calulate y at a fixed 't' over some range of 'x' and display this in a chart
that in inserted into the spreadsheet. Have the values of A,k,w,P readily
available for change.

Somewhere else in the sheet setup a column of 't' values. Have your
equation for y use the contents of a fixed cell say A2 ($A$2). Say you've
stored values of 't' in column T, T1--T100. Now create a macro. Assign the
macro to a key and start recording (and this is the brute force method,
probably can be more automated)--simply go to cell A2 and first insert "+T1"
{enter} (without the quotes),then +T2 {enter}, and continue as far as you
want. When you run the macro the value of 't' will step through all the
values you've assigned as far down the 't' column as you've put into the
macro. The visible graph will be updated each time, and for a reasonably
fast machine (I'm on a P166) the graph appears animated.

(It took longer to type this note than to program Excel.)

Rick

*****************************************************
Richard W. Tarara
Department of Chemistry & Physics
Saint Mary's College
Notre Dame, IN 46556
219-284-4664
rtarara@saintmarys.edu

FREE PHYSICS INSTRUCTIONAL SOFTWARE AVAILABLE AT
http://estel.uindy.edu/inaapt/rickt/software
http://www-hpcc.astro.washington.edu/mirrors/tarara/

Network capable versions of some software now
available at the uindy site.
*******************************************************

-----Original Message-----
From: Tim Folkerts <Tim.Folkerts@valpo.edu>
To: phys-l@atlantis.uwf.edu <phys-l@atlantis.uwf.edu>
Date: Wednesday, January 21, 1998 1:04 PM
Subject: Wave Simulations



While we're talking about handy computer programs, I was hoping to find
a little program that would allow animations of y = Acos(kx-wt+phi).
Ideally the variables could be easily adjusted, say with a little
slider. I wanted set it up in a computer lab so the students could
cantrol the parameters and get immediate feedback on how they affect
the wave.

A well done spreadsheet with macros could do the job, but I don't have
the time to fuss with learning macro programming. Macs come with a
graphing calculator, but the only parameter has to be called "n", which
isn't very useful here. I searched the web without great luck. The
other choice is to by a site license for Mathematica or MathCAD or some
such, but that is rather expensive for one little demo.

So, anyway, does anyone know a cheap, intuitive, foolproof application
to animate y = Acos(kx-wt+phi)?


--- Tim

-----------------------------------------
Tim Folkerts
Email: Tim.Folkerts@valpo.edu
Valparaiso University