|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--wave
This class represents a single wave in the wave packet simulator.
Stuart Lynn (Summer 2002) and Owain Kenway (Summer 2003)
The School of Physics at the University of Edinburgh.
Questions or problems should be sent to s.lynn@sms.ed.ac.uk or
o.a.kenway@sms.ed.ac.uk.
| Constructor Summary | |
wave(double waveno,
double amp,
boolean vis)
This is the only constructor for this class. |
|
| Method Summary | |
void |
drawMe(java.awt.Graphics g,
double t,
int base,
int sizeX,
int sizeY)
Method to draw this wave onto a given graphics context at a specific time. |
double |
getAmp()
Method to return the amplitude. |
double |
getFreq()
Method to return the frequency. |
double |
getValue(double x,
double t)
Method to get the value at a given (x,t) co-ordinate. |
double |
getWaveno()
Method to return the wavenumber. |
void |
setColor(java.awt.Color c)
Method to set colour of wave. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public wave(double waveno,
double amp,
boolean vis)
waveno - the wave number.amp - the amplitude.vis - whether the wave is visible or not.| Method Detail |
public double getFreq()
public double getWaveno()
public double getAmp()
public void setColor(java.awt.Color c)
c - the colour to set it to.
public double getValue(double x,
double t)
x - the x co-ordinate.t - the time co-ordinate.
public void drawMe(java.awt.Graphics g,
double t,
int base,
int sizeX,
int sizeY)
g - the graphics context to draw the wave onto.t - the time to draw it at.base - the base.sizeX - the size of the graphics area in the x direction.sizeY - the size of the Y direction.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||