mathapps
Class FFT2D

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--edu.davidson.tools.SApplet
                                |
                                +--mathapps.FFT2D
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, edu.davidson.tools.SStepable

public class FFT2D
extends SApplet
implements edu.davidson.tools.SStepable

See Also:
Serialized Form

Fields inherited from class edu.davidson.tools.SApplet
clock, dataConnections, dataListeners, dataSources, lock
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
FFT2D()
           
 
Method Summary
 void destroy()
          Destroys the thread and clean up resources.
 void evaluate()
          Evaluate the function on the grid.
 java.lang.String getAppletInfo()
           
 int getEvenID()
           
 int getFFTID()
           
 java.lang.String getFunctionStr(java.lang.String string)
           
 int getOddID()
           
 java.lang.String getParameter(java.lang.String key, java.lang.String def)
           
 java.lang.String[][] getParameterInfo()
           
 void init()
           
static void main(java.lang.String[] args)
           
 void reset()
          Reset the applet to time =0.
 void setAutoRefresh(boolean refresh)
          Inhibit or enable the fft calcuation.
 void setDefault()
          Delete the data connections and set the time to zero.
 void setFFTScale(double scale)
          Scale the output array.
 boolean setFunction(java.lang.String function, java.lang.String xvar, java.lang.String yvar)
          Set the function string and the independent variable.
 boolean setFunctionStr(java.lang.String function)
          Set the function string.
 void setGutter(int pts)
          Decrease the size of the ouptut array by dropping high frequencies.
 void setMinMax(double xmin_, double xmax_, double ymin_, double ymax_)
          Set the minimum and maximum values used to evaluate the function.
 void setNumPts(int nx, int ny)
          Set the number of points for the grid.
 void step(double dt, double time)
           
 
Methods inherited from class edu.davidson.tools.SApplet
addDataListener, addDataSource, cleanupDataConnections, clearAllData, clearData, deleteDataConnection, deleteDataConnections, forward, getClockID, getClockTime, getDataConnectionFromDL, getDataConnectionFromDS, getDataFromDS, getDataListener, getDataListener, getDataSource, getDataSource, getID, getRunningID, getSourceData, getSourceVariables, isAutoRefresh, isClockRunning, makeDataConnection, pause, removeDataListener, removeDataSource, reverse, setClockContinous, setClockCycle, setClockOneShot, setClockTime, setConnectionBlock, setConnectionListener, setConnectionSmoothing, setConnectionSource, setConnectionStride, setDt, setExternalClock, setFPS, setRunningID, setRunningID, setTimeContinuous, setTimeCycle, setTimeOneShot, startClock, stepClock, stepTime, stepTimeBack, stepTimeForward, stopClock, updateDataConnection, updateDataConnections
 
Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FFT2D

public FFT2D()
Method Detail

destroy

public void destroy()
Destroys the thread and clean up resources. Call when the applet is unloaded from memeory and the object is no longer needed.
Overrides:
destroy in class SApplet

evaluate

public void evaluate()
Evaluate the function on the grid.

getAppletInfo

public java.lang.String getAppletInfo()
Overrides:
getAppletInfo in class java.applet.Applet

getEvenID

public int getEvenID()

getFFTID

public int getFFTID()

getFunctionStr

public java.lang.String getFunctionStr(java.lang.String string)

getOddID

public int getOddID()

getParameter

public java.lang.String getParameter(java.lang.String key,
                                     java.lang.String def)

getParameterInfo

public java.lang.String[][] getParameterInfo()
Overrides:
getParameterInfo in class java.applet.Applet

init

public void init()
Overrides:
init in class java.applet.Applet

main

public static void main(java.lang.String[] args)

reset

public void reset()
Reset the applet to time =0.
Overrides:
reset in class SApplet

setAutoRefresh

public void setAutoRefresh(boolean refresh)
Inhibit or enable the fft calcuation. Inhibit auto refresh if a number of parameters are to be changed.
Overrides:
setAutoRefresh in class SApplet
Following copied from class: edu.davidson.tools.SApplet
Parameters:
autoRefresh - Automatic repaint?

setDefault

public void setDefault()
Delete the data connections and set the time to zero.
Overrides:
setDefault in class SApplet

setFFTScale

public void setFFTScale(double scale)
Scale the output array. The amplitude of the output array will be scaled such that the largest value will equal the scale. Setting the scale to zero will disable the scale feature.

setFunction

public boolean setFunction(java.lang.String function,
                           java.lang.String xvar,
                           java.lang.String yvar)
Set the function string and the independent variable.
Parameters:
function - the function string
variable - the independent variable
Returns:
true if the string is a valid function.

setFunctionStr

public boolean setFunctionStr(java.lang.String function)
Set the function string.
Parameters:
function - the function string
Returns:
true if the string is a valid function.

setGutter

public void setGutter(int pts)
Decrease the size of the ouptut array by dropping high frequencies. The number of gutter points will determine the number of high frequency points to drop. The resulting grid will be centered about zero frequency. Setting the gutter should be done after the number of grid points has been set. The gutter cannot be greater than the xgrid/2 or the ygrid/2. Zero will disable clipping.
Parameters:
pts - the number of gutter points

setMinMax

public void setMinMax(double xmin_,
                      double xmax_,
                      double ymin_,
                      double ymax_)
Set the minimum and maximum values used to evaluate the function.

setNumPts

public void setNumPts(int nx,
                      int ny)
Set the number of points for the grid.
Parameters:
nx - the number of points on the x grid
ny - the number of points on the y grid

step

public void step(double dt,
                 double time)
Specified by:
step in interface edu.davidson.tools.SStepable

Copyright Wolfgang Christian

Visit the Davidson CollegePhyslets Page