.TH xgas "" "" "X Client"
.PC "Animated simulation of an ideal gas"
\fBxgas [\-\fIoption ...\^\fB]\fR
.PP
.HS
.SH Options:
.IC "\fB\-bd \fIcolor\fR"
Set the color of the border to \fIcolor\fR
.IC "\fB\-bg \fIcolor\fR"
Set the color of the background to \fIcolor\fR
.IC "\fB\-bw \fIpixels\fR"
Set the width of the border to \fIpixels\fR
.IC "\fB\-display \fIhost\^\fB[:\fIserver\^\fB][.\fIscreen\^\fB]\fR"
Display the client's window on screen number \fIscreen\fR
of \fIserver\fR on host system \fIhost\fR
.IC "\fB\-fg \fIcolor\fR"
Set the color of the foreground to \fIcolor\fR
.IC "\fB\-fn \fIfont\fR"
Use \fIfont\fR in the display
.IC "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to \fIgeometry\fR
.IC \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors
.IC "\fB\-xrm \fIresourcestring\fR"
Use \fIresourcestring\fR to define a resource
.HE
.B xgas
models an ideal gas in a heated chamber.
The chamber is partially divided into two parts.
You can control the temperature of each part independently
by clicking on a scrollbar:
.PH 1 1 \*(XD/xgas.eps
.PP
Each dot represents a molecule.
The ``molecules'' move within the box;
when they touch a wall, they assume the
temperature to which you have set that part of the chamber.
Their velocities depend upon their temperature.
.PP
Click the left mouse button to create a molecule at the cursor's position.
Click the right mouse button to create the maximum number of molecules
at the cursor's position.
.PP
The
.B xgas
window displays the following four buttons:
.IP \fK(Quit)\fR
Exit from
.BR xgas .
.IP \fK(Run)\fR
Run the game continually.
.IP \fK(Pause)\fR
Stop running the game.
To resume running, click
.K Run
again.
.IP \fK(Step)\fR
Run the game one step at a time.
This lets you examine in detail how the ``molecules'' move and are influenced
by the temperatures of the chamber.
.IP \fK(Help)\fR
This option displays a help message on how to run
.BR xgas .
If you wish, you can also read a document on the physics of
an ideal gas and how
.B xgas
models them.
.SH Options
.B xgas
recognizes the following command-line options:
.IP "\fB\-bd \fIcolor\fR" 0.75i
Set the color of the border to
.IR color .
.IP "\fB\-bg \fIcolor\fR"
Set the color of the background to
.IR color .
.IP "\fB\-bw \fIpixels\fR"
Set the width of the border to
.IR pixels .
.IP "\fB\-display \fIhost\^\fB[:\fIserver\^\fB][.\fIscreen\^\fB]\fR"
Display the client's window on screen number
.I screen
of
.I server
on host system
.IR host .
.IP "\fB\-fg \fIcolor\fR"
Set the color of the foreground to
.IR color .
.IP "\fB\-fn \fIfont\fR"
Use
.I font
in the display.
.IP "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to
.IR geometry .
The term ``geometry'' means the dimensions of the window and its location
on the screen.
.I geometry
has the form \fIwidth\(muheight\(+-xoffset\(+-yoffset\fR.
.IP \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors.
.IP "\fB\-xrm \fIresourcestring\fR"
Use
.I resourcestring
to define a resource.
.SH "X Defaults"
.B xgas
uses the following X resources:
.IP \fBtimeStepSize\fR
Set the simulated time duration, in microseconds, for each cycle of computation.
.IP \fBdelay\fR
Set the real time interval between timestep computations.
.IP \fBrandomBounce\fR
Each time a molecule collides with a wall, it bounces elastically
(angle of incidence equals angle of reflection).
This default adds a component of randomness to this angle.
.B RandomBounce
varies from 0.0 (no randomness)
to 1.0 (completely random angle of incidence).
.IP \fBequilibrium\fR
Each time a molecule collides with a wall,
its kinetic energy approaches that
of the temperature of the wall.
If
.B equilibrium
is 1.0,
the molecule reaches the wall temperature immediately.
For values between 1.0 and 0.0,
the molecule approaches the temperature of the wall more slowly.
.IP \fBmaxMolecules\fR
Set the maximum number of molecules.
.SH Files
\fB/usr/X11/lib/app-defaults/XGas\fR \(em Default resource file
.SH "See Also"
.B
ico,
X clients,
xwd
.R
.SH Notes
When the chamber is resized, molecules should be rearranged appropriately.
Instead, the molecule arrays are reinitialized.
.PP
Copyright \(co 1991, Massachusetts Institute of Technology.
.PP
.II "Medwin, Larry"
.B xgas
was written by Larry Medwin.
