packages icon



 XWAVE(1)                       X Version 11                        XWAVE(1)
                               4 February 1991



 NAME
      xwave - A real-time perspective mesh demo for X

 SYNOPSIS
      xwave [ -amp A ] [ -bound bits ] [ -cols C ] [ -dampfactor B ] [ -demo
      nameOrNum ] [ -edit ] [ -force funcname ] [ -forcecol N ] [ -forcefull
      ] [ -forcepoint R C ] [ -forcerow N ] [ -omega M ] [ -omega2 M ] [ -
      plotvel ] [ -printdemo nameOrNum ] [ -root ] [ -rows R ] [ -springconst
      K ] [ -stereo ] [ -version ] [ -wave funcname ]


 DESCRIPTION
      Xwave plots a perspective projection of a plane grid oscillating in
      three-space in real time.  You can select the size of the grid, a
      forcing function to apply (and where to apply it), and what wave
      propagation model to use.  You can display a plot of the velocity of
      the points in the grid as well as the position.  Double buffering is
      simulated using a background pixmap.  Other options are described
      below in the "OPTIONS" section.  While the wave is being displayed,
      you can pan and zoom, stop and start updates, and make other changes.
      This is described below in the "INTERACTIVE USE" section.


 OPTIONS
      -amp A
           Select the amplitude of the forcing function.  Typical numbers
           are between 20 and 100.  Default amplitude is 100.

      -bound bits
           Select which corners and edges of the grid are bound and which
           are free.  By default, all corners and edges are bound.  If you
           specify a single "0" or "1" as the argument to -bound, it applies
           to all eight corners and edges.  Otherwise, each character in the
           string applies to one corner or edge: if that character is "0",
           the corresponding corner or edge is free; else it is bound.  The
           sequence of corners and edges in the string is: lrlc, lr, lrhc,
           hc, hrhc, hr, hrlc, lc, where l is low, h is high, r is row, and
           c is column.  For example, -bound "00111000" means the high
           column end of the grid, including those corners, are bound, and
           all other corners and edges are free.

      -cols C
           Specify how many columns are in the grid.  The minimum number of
           columns is 2.  Larger numbers give more detailed  wave displays,
           but take longer to compute and thus do not update as quickly.
           The default is 25.

      -dampfactor B
           Specify the damping factor used in the "wave" propagation model.
           See the -wave switch for more details.  The default is 0.001.




                                    - 1 -      Formatted:  November 14, 2024






 XWAVE(1)                       X Version 11                        XWAVE(1)
                               4 February 1991



      -demo nameOrNum
           Select a demonstration to run.  Each demo is equivalent to a
           specific set of switches (which you can see with the -printdemo
           command line option).  For a quick tour of the program, run
           "xwave -demo N" starting with N=0 and incrementing until it tells
           you there are no more demos.

      -edit
           Allows the user to interactively shape the wave while the program
           is running.  When the program is in edit mode, the mouse controls
           an X-shaped cursor that moves over the surface of the grid.
           Position the cursor to where you want to modify the wave and
           press and hold the left mouse button.  At this point, dragging
           the mouse up and down will modify the amplitude of the wave and
           dragging it left and right will control the frequency.  Releasing
           the mouse button will allow you to modify additional points.
           When you are finished editing points, press the right mouse
           button to enter continuous run mode.

      -force funcname
           Specify the name of the forcing function to use.  This can also
           be changed interactively (see the INTERACTIVE USE section).

      -forcecol C
           Specify that the selected forcing function is to be applied to
           all grid points in the specified column.  (The multisine forcing
           function ignores this information.)

      -forcefull
           Specify that forcing functions which do not cover the full cycle
           should force a zero value during the remainder of the cycle.  By
           default, the forcing function takes no action during this part of
           the cycle, but lets the point move freely.  This affects the
           following forcing functions: delta, pulse, onehalfsine,
           onehalfsinesquared.

      -forcepoint R C
           Specify that the selected forcing function is to be applied to
           the specified grid point.  (The multisine forcing function
           ignores this information.)

      -forcerow R
           Specify that the selected forcing function is to be applied to
           all grid points in the specified row.  (The multisine forcing
           function ignores this information.)

      -omega M
           Specify a frequency multiplier for forcing functions.  A larger
           number makes the forcing functions cycle through their values
           faster.




                                    - 2 -      Formatted:  November 14, 2024






 XWAVE(1)                       X Version 11                        XWAVE(1)
                               4 February 1991



      -omega2 M
           Specify a secondary frequency multiplier.  This number is used in
           the following forcing functions: pulse, onehalfsine,
           onehalfsinesquared.  If "-omega2 1" is specified, each of these
           functions will have a duty cycle of 1/2; if "-omega 2" is
           specifed, it will be 1/4, etc.

      -plotvel
           Specify that a plot of the velocity of each point in the grid
           should appear below the plot of the position of each point in the
           grid.  The velocity information is updated only by the "wave"
           propagation function.

      -printdemo nameOrNum
           Print the switches that comprise the specified demo, then exit.

      -root
           Plot the wave in the root window.

      -rows R
           Specify how many rows are in the grid.  The minimum number of
           rows is 2.  Larger numbers give more detailed  wave displays, but
           take longer to compute and thus do not update as quickly.  The
           default is 18.

      -springconst K
           Specify the spring constant to use in the "wave" propagation
           function.  See the -wave switch for more details.  The default is
           0.01.

      -stereo
           Plot separate projections in red and blue.  Make sure you have
           your 3-d glasses handy.  You also need a color display
           (obviously).

      -version
           Prints the current version of xwave and exits.

      -wave funcname
           Specify the name of the wave propagation function to use.  You
           can specify none, which allows you to see the "naked" forcing
           function.  You can specify relax, which gives a pleasant demo
           with the multisine forcing function (the original xwave program).
           You can specify wave, which uses a physical wave propagation
           model.  In the wave model, each point has a mass of 1 and a
           velocity as well as a position.  A simple spring model is used, F
           = -K*x -B*v, where K is the spring constant (specified with
           -springconst) and B is the damping factor (specified with
           -dampfactor).  The distance used for x is the simple vertical
           distance between a point and its neighbors.  Note that since this
           is a discreet simulation, the simulation is highly dispersive



                                    - 3 -      Formatted:  November 14, 2024






 XWAVE(1)                       X Version 11                        XWAVE(1)
                               4 February 1991



           (low frequencies travel faster), so single pulses do not travel
           very well.  However, you can still see the effects of reflection
           against a free or bound end, set up nice standing waves, see how
           the velocity is out of phase with the position, etc.


 INTERACTIVE USE
      While xwave is running, you can change the perspective by using the
      mouse buttons.  You can pan the picture as it is running by holding
      down the middle mouse button and moving the mouse.  You can zoom in
      and out by holding down the left or right mouse buttons.  (Note that
      these operations do not work unless xwave is running in continuous run
      mode.) There are a number of single-key keyboard commands you can
      enter into the graphics window of xwave.  These commands can be
      entered whether or not xwave is in continuous run mode.  If the
      command is not understood, the bell is rung.  Note that there may be a
      bit of delay in processing a keyboard command when the program is in
      continuous run mode.

      c    Clear the data and reset the forcing function time; everything
           starts over again.

      d    Load the forcing function data.  This is useful when in step
           mode.

      f    Select a different forcing function.  The new forcing function
           name is printed out.

      p    Print out data.  Prints out all velocity and position data which
           is non-zero.  Mainly useful in step mode for debugging.

      q    Quit the program.

      r    Toggle run/step mode.  In run mode, the program runs continuously
           and updates the screen.  This consumes 100% of the available cpu
           time, and looks nice.  In step mode, you can step through each
           generation by pressing the space bar, and see in detail how the
           grid changes at each step.  By default, the program comes up in
           continuous run mode.

      t    Toggle timing mode.  When the program is in time mode, it prints
           an approximation of how many frames per second it is displaying.
           This is re-calculated and printed every 50 frames.

      w    Select a different wave propagation function.  The new
           propagation function name is printed out.

      <space>
           Step (when in step mode).  Calculates and displays the grid at
           the next time point.




                                    - 4 -      Formatted:  November 14, 2024






 XWAVE(1)                       X Version 11                        XWAVE(1)
                               4 February 1991



 AUTHORS
      Paul Riddle (paulr@umbc3.umbc.edu)
      Mike Friedman (mikef@umbc3.umbc.edu)
      Jim McBeath (jimmc@hisoft.uucp)


















































                                    - 5 -      Formatted:  November 14, 2024