Contents

Introduction

Tutorial

Input

Output

Commands

Keyboard

Help with Help

Data Formats

Appendix I (internal details)

Appendix II (registration)

Appendix III (bug list)

Exit


Introduction

WinTab is a low level waveform manipulation program.  The program supports input from a graphics tablet (hence the 'tab' part of WinTab) and also from a mouse.  The program is designed to allow the user to diddle with the individual data values using the mouse or keyboard input.  The program can also  read data in from data files and import data from other applications via the Windows clipboard.

After manipulating the individual data points, the data can be saved to a data file, sent to other applications via the clipboard, or played through a Multimedia sound output device.

The axes for the data may be adjusted as can the colors of the graph.  The colors are read from an ASCII text file called wintab.rgb which can be edited using any text editor (such as Window's NOTEPAD.EXE).  The actual values of the axes and the data points are stored as accurately as possible and are not limited to integers.  The maximum number of data points is quite large but 200,000 seems to be the upper limit of most user's patience.

WinTab consists of four files:  the executable wintab.exe, the color lookup file wintab.rgb, a reference file called wintab.ini and this file wintab.hlp.  To install WinTab, just place these four files in a directory and run WinTab like any other Windows applications.  To remove WinTab from your system, just erase these four files.

For further reference, see:

Contents , Tutorial , Registration , Version Number


Input

There are several ways to get data into WinTab.  WinTab can read data files from the hard disk or floppy drive, retrieve data from the clipboard, get input directly from the mouse and get data from a graphics tablet.

Data read from a disk is obtained via the File | Open command and must be in one of the recognized data formats.  Copying data from the clipboard is accessed by using the Edit | Paste command.  A text format, a metafile format, and a waveform format are supported.

The graphics tablet is accessed on COM1, COM2, COM3, or COM4 and is assumed to be compatible with a Summagraphics tablet.  Any cursor button may be used to register the data points.

The mouse is used to enter data points using the Left mouse button when in insert mode.  In edit mode, the points may be moved around with the mouse or the coordinate value may be changed using the position box.  (edit mode is also used to perform analysis or manipulation on the data).

The keyboard interface of WinTab is similar to other Windows applications.  The ALT key accesses the menu bar and the arrow keys move from selection to selection.  The arrow keys may also be used to select items from a menu (then hit ENTER).  The ALT and CONTROL keys are also used in conjunction with alpha keys to act as speed keys (thus ALT+S will smooth the data).

For further reference, see:

Opening Files , Copying from the Clipboard , Using the Mouse , Using the Graphics tablet , Using the Keyboard , Data Formats , Command Refernce , Function Generator , Data Analysis , Output


Output

There are several ways to get data out of WinTab.  WinTab can write data files to the hard disk or floppy drive, send data to the clipboard, and play sounds through a multimedia sound device.

Data can be written to the disk using the File | Save and File | SaveAs commands and must be in one of the recognized data formats.  Copying data to the clipboard is accessed by using the File | Copy To Clipboard command.  A text  format, a bitmap format, a metafile format, and a waveform format are supported.

For further reference, see:

Saving Files , Copying to the Clipboard , Data Formats , Command Refernce , Data Analysis , Input


Command summary
Commands

The following menu commands are available:

File

New

Open

Save

Save As

Copy to Clipboard | Bitmap

Copy to Clipboard | Metafile

Copy to Clipboard | Wave

Copy to Clipboard | Text

Play Sound

Exit

Edit

Undo

Cut

Copy

Paste

Clear

Move

Flip Values

Swap Axes

ScaleTo...

Utility

Zoom

Position

Status

Autosort

Function Generator

Calculator

Rectangular to Polar

Polar to Rectangular

Radians to Degrees

Degrees to Radians

Rescale Axes

Smooth

Unsmooth

Resample Points

Mode

Insert

Edit

Line

Degrees

Radians

Plot Type

Data Type

Analysis

x2 < x1

x2 = x1

(x1,y1)=(x2,y2)

Global Maximum

Global Minimum

Local Maximum

Local Minimum

Setup

Colors

Sound

Point Size

Line Width

Save Settings

Source

Mouse

Graphics Tablet

For further reference see:

Input , Mouse operations , Keyboard operations


Data Formats

Presently, WinTab supports several different data file formats:

Single/Multi Column text

SIG formatted data files

.WAV files

.XLS data files

.WKS data files

For further reference, see:

Input , Output


OS/2

This version of WinTab is compiled for use with Microsoft Windows 3.1.  Thus, it will not work with OS/2 2.0.  WinTab uses a few of the memory management functions that are new to Windows 3.1.

Several OS/2 2.1 users have reported that WinTab works with no problems under 2.1.  If you are unable to get it working under OS/2 2.1, then please e-mail me any error boxes that WinTab generates.


version
Version Number

The version number is accessed via  Help | About.  The version number reflects major upgrades and bug fixes.  All references to WinTab should be through the version number.

The e-mail address is also shown in the About dialog box.

see also:

Help with Help or E-mail


vertical bar

The menu commands are accessed by selecting the selection from the menu bar and then selecting the submenu or item.  The standard notation to signify this is using a vertical bar to separate menu choices.

Thus, the following is the notation to access the Exit command:

File | Exit

which indicates that first the File option is selected from the menu bar and then the Exit command is selected from the resulting menu.  Further menu choices generate additional separator bars:

Source | Graphics Tablet | Com1


Speed Keys
Using the Keyboard

The following speed keys are defined:

F1	Context sensitive help

SHIFT+F1	Help index

F3	Save

ALT+BKSP	Undo

SHIFT+DEL, CTRL+X	Cut

CTRL+INSRT, CTRL+C	Copy

SHIFT+INSRT, CTRL+V	Paste

DELETE	Clear

ALT+Z	Zoom box

ALT+P	Position box

ALT+A	Autosort points

ALT+F	Function Generator

ALT+S	Smooth

ALT+U	Unsmooth

ALT+I	Insert mode

ALT+E	Edit mode

ALT+L	Line mode

ALT+X	next local maXimum

ALT+N	next local miNimum

The following keys are defined to move from point to point (must be in edit mode):

RIGHT_ARROW	select the next data point

LEFT_ARROW	select the previous data point

PGUP	select the point 10% further up

PGDN	select the point 10% back

HOME	select the point at the beginning

END	select the point at the end

LMOUSEBTN	select the point closest to the mouse cursor

The following keys are defined to quickly select multiple data points (must be in edit mode):

SHIFT+RIGHT_ARROW	add next point to group selection

SHIFT+LEFT_ARROW	add previous point to group selection

SHIFT+PGUP	add points between this and next page to group

SHIFT+PGDN	add points between this and previous page to group

SHIFT+HOME	add points between this and the first

SHIFT+END	add points between this and the last

CTRL+LEFT_ARROW	move to the next point, maintain group

CTRL+RIGHT_ARROW	move to the previous point. maintain group

CTRL+PGUP	move to the next page, maintain group

CTRL+PGDN	move to the previous page, maintain group

CTRL+HOME	move to the first point, maintain group

CTRL+END	move to the last point, maintain group

SHIFT+LMOUSEBTN	add points between previous point and this to group

CTRL+LMOUSEBTN	toggle selection status of this point, maintain group

The following keys are defined to quickly select multiple data points (must be in insert mode):

SHIFT+LMOUSEBTN	continuously draw points as the mouse is moved


Keyboard combinations using the ALT, CONTROL and SHIFT keys are displayed using the following syntax:

ALT+S      CTRL+F2      SHIFT+T

ALT+S indicates that the ALT key should be held down while the S key is pressed.  Both keys may then be released.

CTRL+F2 indicates that the CONTROL key (also called the CTRL key) should be held down while the F2 function key is pressed.  Both keys may then be released.

SHIFT+T indicates that the SHIFT key should be held down while the T key is pressed.  Both keys may then be released.


The standard keyboard contains 10 or 12 function keys whose exact duties are programmable.  These function keys are denoted as:

F1  F2  F3  F4  F5  F6  F7  F8  F9  F10  F11  F12

and are either on the side of the keyboard or form a row across the top of the keyboard.  These function keys may be used in conjunction with the ALT, CONTROL and SHIFT keys.


Maximum number of data points

The data arrays that store the points in the graph are allocated dynamically.  The upper limit is thus governed by the architecture (286 or 386/486) and the Windows mode (Real, Standard, or 386).  The upper limit when running in 386 Enhanced mode is 500,000 data points [16Meg/(4 floats/Point * 4 bytes/float) / (1 scratch graph + 1 user graph)].  This will be expanded to 1,000,000 data points in the next version once the '/ 2' term is eliminated from the above expression.

For further reading, see:

Data Points , Data Formats , or Appendix I -- Gory Details


Lotus 123 (.WKS) file format

Oops! this is still vaporware...


Waveform files
Multimedia (.WAV) file format

The WAV files are standard Windows multimedia waveform audio files.  These may be played through a multimedia device using the play command (File | Play), read in using the open command (File | Open), saved to an output file (File | SaveAs), copied to the Windows Clipboard (File | CopyClip | Wave), or pasted into WinTab from the Windows Clipboard (Edit | Paste).

If no previous format exists, then the sound format that is used is the one from the sound setup box (Settings | Sound) controlling sampling rate, resolution, etc.

You may want to use the Smooth command to smooth out a waveform before playing or saving it if you created it manually.  Smoothing pre-existing waveform files has little effect (other than gobbling up memory).

Note that when cutting and pasting wave files, the axes values in WinTab are rescaled to the range appropriate for a WAV file.  Thus, copying a graph to the clipboard (as a WAV file) and repasting it will not preserve the floating point values.  You should use Edit | Paste instead of File | CopyClip | Wav to preserve the floating point magnitude and initial time values.

If you do not have a sound card, there is a driver (SPEAKER.DRV) available from many BBS's that allows Windows to use the speaker for sound output.  This driver is not shipped with Windows.  The output quality (with interrupts turned off) is acceptable.

see also:

Resample Points , Command Reference , Play Command , Input , Output , Save Command , Clipboard , Data Formats , Output Devices , Sound Setup


Microsoft Excel (.XLS) data file

Oops! this is still vaporware...

For the time being, read and save the data files as Tab delimited text files.

Excel can both read and write this type of file.


A Comma is an ASCII 44, 0x2C (',') and is represented

by hitting the Comma key on  the keyboard


A Tab is an ASCII 9 (\t) and is represented

by hitting the Tab key on the keyboard


A Space in an ASCII 32, 0x20 (' ') and is represented

by hitting the Space Bar on the keyboard


A Carriage Return is an ASCII 13 (\r) and might be

represented by hitting the Enter or Return key on

the keyboard


A Line Feed (New Line) is an ASCII 10 (\n) and might

be represented by hitting the Enter or Return key on the

keyboard


Executable file

wintab.exe is the executable program that runs

under MicroSoft Windows.

see also:

Color Data File(wintab.rgb) , Initialization file , Help file , or Deinstallation


Help file

wintab.hlp is the help file for WinTab.  It is called

by the MicroSoft Windows Help system.  This file

should be in the same directory as wintab.exe

see also:

Color Data File(wintab.rgb) , Initialization file , Executable file , or Deinstallation


Initialization file

wintab.ini is an initialization file for WinTab.

This file holds color setup information and

display customization information.  This file

should be in the same directory as wintab.exe

see also:

Color Data File , Executable file(wintab.exe) , Save Settings command , Help file , or Deinstallation


Help with Help
Assistance in using Help

To access information in using the MicroSoft Help system, select the   Help | How to     command from the WinTab menu bar.  To search for Help topics, select the Help | Search  command.


Text File Format

Several different ASCII text input file formats are supported for both input and output.  Commas, Tabs and Spaces may be used as delimiters with carriage returns, line feeds or a combination of both at the end of each line.  One data point is allowed per line.

The following presents an example of a 2 column data file with a comma delimiter:

1e+4 , 0.0

1.1e+4 ,  0.2

1.2E+4,0.4

1.30e+4 , 0.5

15000 ,0.30

1.8e+4 ,  0.1

The first column is the 'x axis' while the second column is the 'y axis'.  Notice that data alignment and format are not important.

For further reference, see:

Axes information , Point Description , Input , Output


SIG Format
SIG formatted data file format

SIG is a fairly simple data file format used by some mainframe computer signal processing codes.  There is a multiple line header followed by a series of data values.

The following is an example of a time waveform data file:

% DT 0.1E+4

% T0 1.0E+4

% TITLE

 Time waveform of experiment 2

% SUBTITLE

 taken by Jim on May 13th

(E16.8)

  0.00000000E+00

  0.20000000E+00

  0.40000000E+00

  0.50000000E+00

  0.30000000E+00

  0.10000000E+00

Notice that the data alignment and spacing is important.  The (E16.8) line is a Fortran format statement.  The space at the beginning of the Title and Subtitle line is required.  The alignment of the data values must match the format statement.

The following is an example of a frequency waveform data file:

% DF 0.2E+7

% F0 50.0E+6

% TITLE

 Frequency waveform 50MHz to 58MHz

% SUBTITLE

 test results of 3dB filter

(2E16.8)

  0.74149342E+01 -0.12795335E+01

  0.73961759E+01 -0.12619262E+01

  0.73895755E+01 -0.12620761E+01

  0.73636832E+01 -0.12738394E+01

  0.73502612E+01 -0.12840850E+01

Notice that the data alignment and spacing is important.  The (2E16.8) line is a Fortran format statement.  The space at the beginning of the Title and Subtitle line is required.  The alignment of the data values must match the format statement.  The data is complex frequency data with the Real{} component in the first column and the Imag{} component in the second column (in this example, the imaginary component is negative).

For further reference, see:

Axes information , Point Description , Input , Output


RGB file
Wintab.rgb color data file format

Wintab.rgb is a text file describing colors with three integers (one each for the Red, Blue and Green components of the color).  The integers range from 0 to 255.  The following is the syntax of typical color entries:

255	192	48	Bright Mustard

134	26	26	DarkFirebrick

255	128	144	Miami Pink

One color is allowed per line, the integers are at the beginning of each line and are separated by spaces.  The alignment and spacing is not important.  A description of the color may come at the end of the line.

When the Setup | Colors box is selected, the edit color screen is presented.  If the RGB option is selected for one of the screen attributes, then this list box is filled with the colors from wintab.rgb.  The file should be in the same directory as the executable program.

The file wintab.rgb should be in the same directory as wintab.exe

For further reference, see:

Colors , wintab.exe , wintab.ini , wintab.hlp


Point Description

The data points used internally by WinTab are three dimensional vectors large enough to hold complex frequency data and the corresponding frequency ordinates.  The numbers are stored as floating point numbers and do not get quantized unless points are manipulated with the mouse.  The Position Box can be used to view the exact values of individual points and also to edit the value of the points.

The number of columns in a data set (the dimensionality of the point) defaults to two.  If data is read in from a data file or imported from the clipboard then the number of columns is determined directly from the data.  Using the Save As command allows the user to specify the number of columns in an output file.

The color of the data points may be changed using the Setup | Color command.

Multiple points may be selected using either the mouse or the keyboard in conjunction with the SHIFT or CONTROL keys.

For further reading, see:

Data Formats , Save Settings command , Appendix I -- Gory Details , or Colors


Metafile Description
Metafiles

Microsoft Windows supports a generalized 'metafile' format so that different applications can exchange information about complex or vector data.  The metafiles used by WinTab use a combination of 'moveto' and 'lineto' commands to locate and connect data points.  The metafile 'ellipse' command is also used to draw large points.

Metafiles can be read by drawing packages and are typically generated by drawing packages and other packages that generate graphs (spreadsheet programs).  If you paste a metafile into WinTab, any graphical axis information that the metafile contained is included in the data.  This axis information can easily be removed if Utility | AutoSort is turned off when performing the paste.  Most programs put the axis information (grid lines, tick marks, etc) either at the beginning or the ending of the data so it can be erased in a group.

Fax users can digitize a fax and put it into a program that will connect the dots to form curves (Micrografx Designer and Corel Draw do this).  Then, take the resulting metafile, put it into the clipboard and then paste that into WinTab.  This will allow you to receive a graph via fax and end up with the corresponding data points via WinTab.

WinTab can both read and write metafiles.

For further reading, see:

Clipboard , Input , Output , Bitmaps , or Colors


Bitmap Description
Bitmaps

Microsoft Windows supports a generalizes 'bitmap' format so that different applications can exchange information about raster data (a screen dump or a paint drawing).  The bitmap is composed of pixels.  The bitmaps generated by WinTab is just a screen dump of the WinTab environment (including the axes buttons).

Bitmaps can be read by paint programs and are typically generated by other paint packages.  WinTab can not read bitmaps from the clipboard.

For further reading, see:

Clipboard , Input , Output , Metafiles , or Colors


Windows Clipboard

The windows clipboard can be used to import data into WinTab and to export data from WinTab into other applications.  WinTab can read text data and metafiles from the clipboard and translate those into data points.  WinTab can also write text, metafiles and bitmaps to the clipboard.  These formats can then be read by text editors, drawing packages, and paint programs.

The bitmap data that is sent to the clipboard looks identical to the screen configuration when the command is issued.  Thus, if the Position Box is inside the WinTab main window, then the information in the position box will be saved with the bitmap.  The values of the axes buttons are also saved in the bitmap.  You cannot paste bitmaps into WinTab.

The text data that is sent to the clipboard consists of the coordinates of the data points, one per line, with a comma, tab or space delimiter.  The number of columns equals the number of columns in the original data.  Data input from the keyboard, mouse, or graphics tablet has two columns.  Frequency data read in from a data file could have as many as three columns.

The metafile data that is sent to the clipboard is a representation of the data points (or lines when in line mode) with the axes also drawn.  Note that when a metafile is read from the clipboard and pasted into WinTab then any axis information would also be included with the data.  For this reason, it is advisable to turn off autosort points before pasting a metafile into WinTab.  Usually, the axis information generated by other programs is grouped together and can easily be removed after pasting the data into WinTab.

For further reference, see:

Axes information , Colors , Point Description , Input , Output , Data Formats


Tutorial

Setup

WinTab can be started in several ways.  Since you are reading this tutorial, then you must have succeeded in using one of them!

1. Use the Program Manager's File | Run command to start wintab.exe

2. Add an icon to the Program Manager using File | New

3. Start Windows and WinTab at the DOS prompt by typing:  win wintab

There are only four files that constitute the WinTab system:

the executable,  wintab.exe

the color lookup file,  wintab.rgb

a reference file called,  wintab.ini

a help file called, wintab.hlp

Installation / Deinstallation

To install WinTab, just place these four files in a directory and run WinTab like any other Windows applications.  To remove WinTab from your system, just erase these four files.

Operation

After starting WinTab, you are greeted with a blank screen with four buttons.  These buttons are the axes labels.  To enter points using the mouse, just click with the left mouse button in the blank area.  A small white dot will appear.  Click in several places to trace out a curve on the screen.

If you hit ALT+L then the points will be connected by a line.  Hitting ALT+E will all you to edit the individual points using the mouse.  To enter addition points, just hit ALT+I to get back into insert mode and continue entering points with the mouse.

To edit the points with the mouse, hit ALT+E to get into edit mode then click with the left mouse button to select a point.  Continue to hold down the mouse button and drag it across the screen.  The point will follow the mouse cursor.  Hit ALT+P to activate the Position Box.  Select another point and drag it across the screen.  Notice that as the point is moved, its coordinates change.

Hit ALT+Z to activate the Zoom Box.  As the cursor moves around on the screen, a small section around the cursor is magnified in the zoom box.  Use the mouse to select the Setup | Point Size option and change the value to 3.  Notice that the size of the dots on the screen got larger.  The diameter is now 3 pixels.

Hit one of the axes buttons on the WinTab screen and change the value using the number keys on the keyboard.  Use the delete key to erase the number that is currently there and enter the number 2.  Notice that the graph changed accordingly.

Now select the File | Save command to save your work.  Enter a file name in the text field and select the OK button.  Now select the File | New command to clear the screen.

To read in a file from the disk, select the File | Open command from the menu bar.  In this case, we will open the file that we just saved!  Enter the file name in the text field and click OK.

For further reference, see:

Contents , Introduction , Using the Mouse , Using the Graphics tablet , Using the Keyboard , Data Formats , Command Refernce ,  Input , Output , Registration , Version Number


Exit Command

The exit command will terminate the present job and shut down WinTab.  If there is  unsaved data, then WinTab will prompt the user before discarding it.

see also:

New , Open , Save , Command Reference


New Command

The new command will clear the screen of any current graph.  The new command is usually used to abort a graph or to start a new graph.

see also:

Open , Save , Command Reference


Open Command

The open command will prompt the user to enter the name of a data file.  The file can be one of several formats.  The format is detected automatically from the data file.  Any already existing data will be overwritten by the new data.

see also:

Save , Paste , New , Command Reference


Save Command

The save command will store the current data into a user specified data file on the disk.  If the file type is known, then the data will be saved in that format.  If the file type is unknown, then the default will be used.  If the user wishes to specify a data type then the SaveAs command should be used.  The format is detected automatically from the data file during the input process.  The existing data is not destroyed during the save process.

If you attempt to exit WinTab or attempt to write over existing data (using the Open command) then WinTab will ask if you want to save the existing data first.

see also:

Open , Copy , Cut , New , Save Settings command , Speed Keys , Status Box , Command Reference


saveAs command
SaveAs... Command

The 'Save As...' command will store the current data into a user specified data file on the disk.  The user may specify the desired data format at this time by selecting the radio buttons for the different data types.  Any subsequent calls to the save command will store the data in this format.  The existing data is not destroyed during the SaveAs process.

If you attempt to exit WinTab or attempt to write over existing data (using the Open command) then WinTab will ask if you want to save the existing data first.

You may change the current directory by choosing the directory selections ([..], [-a-], [-b-], [-c-], ..., [dos],[windows],...).  If you do not provide an extension for the file, then one will be provided.

see also:

Open , Save , Copy , Cut , New , Save Settings command , Status Box , Command Reference


cut command
Cut To Clipboard

The cut command will store the only currently selected data into the clipboard using the default format.  The selected data is then erased from the WinTab screen.  Note that to use Cut, you must be in edit mode AND have one or more points selected.

Multiple data points may be selected using the mouse or keyboard.

see also:

Windows Clipboard , Paste , Copy , Clear , Selecting Data , Command Reference


copy command
Copy To Clipboard

The copy command will store only the currently selected data into the clipboard using the default format.  The selected data is not erased from the WinTab screen.  Note that to use Copy, you must be in edit mode AND have one or more points selected.

Multiple data points may be selected using the mouse or keyboard.

The Edit | Copy command is different from the File | Copy...Bitmap/Metafile/Text command in that this copy command (e.g. Edit | Copy) will copy only the selected data point(s) and only in the default format.

see also:

Windows Clipboard , Paste , Cut , Clear , Selecting Data , Status Box , Command Reference


paste command
Paste from Clipboard

The paste command will retrieve the text or metafile data currently in the clipboard and place it into WinTab.  The text data can have the same formats as seen in the Open command.  Any already existing data is not erased from the WinTab screen.

If the autosort points option is selected, then the points are sorted as they are pasted into the WinTab environment.  This way, points may be input in any order and still come out as a real function (e.g. y=f(x), x2>=x1).  In some cases, it is advantageous to turn off AutoSort before pasting data.

see also:

Windows Clipboard , Cut , Copy , Clear , Command Reference , Autosort Points


play command
Setup and Play Sound Commands

The play command (File | Play) will send the present waveform out to a multimedia sound device.  If the sound device is allocated to another resource or is not present then the some meaningless status information will be displayed to the user.

The x axis should correspond to time, in seconds.  Thus a waveform from 0 to 2 will last for 2 seconds.  Changing the sampling rate will not change the duration (that's what the calculator is for).  The y axis infomation is scaled for maximum volume automatically.  The actual waveform on the screen can be quite sparse -- WinTab will use linear interpolation to resample the waveform using the sampling rate specified in the Setup | Sound dialog box.

You may want to use the Smooth command to smooth out a waveform before playing it.

The multimedia setup command is accessed via Setup | Sound.  The command to generate the sound is File | Play.

If you do not have a sound card, there is a driver (SPEAKER.DRV) available from many BBS's that allows Windows to use the speaker for sound output.  This driver is not shipped with Windows.  The output quality (with interrupts turned off) is acceptable.

see also:

Resample Points , Command Reference , Wave (.WAV) Files


This command is presently not operational


There is no help for this command


System Icon

This is the system icon:

It is used to access system features or functions not included in the menu bar.  If there is no menu bar or no buttons, then all of the functions for that window are in the system menu.


flip values commands
Flip x, y, z Values Commands

The three 'Flip Values' commands are accessed by using the menu option Edit  | Flip X   or   Edit | Flip Y   or   Edit | Flip Z.

The flip commands will reverse the values of the data points for the specified axis (X, Y, or Z).  A subset of points may be selected by using the mouse and the SHIFT key in coordination with the arrow keys.  The result of flipping is that the graph is backwards while the data ranges for that axis remain the same.

If autosort is not turned on, then the points will no longer maintain their original order in the series.  Flipping in line mode will cause lines to be drawn from the end of the original plot to the begining of the flipped region.

see also:

Command Reference , Autosort Points , Status Box


Swap Axes Commands

The three 'Swap Axes' commands are accessed by using the menu option Edit  | Swap X/Y   or   Edit | Swap X/Z   or   Edit | Swap Y/Z.

The swap commands will exchange the two selected axes (X, Y, or Z).  The data comprising each axis is not changed but the data points themselves are changed to reflect the new axes ordering.

If autosort is not turned on, then the points will no longer maintain their original order in the series.

see also:

Command Reference , Autosort Points , Status Box


scale to command
Scale To Commands

The Scale To command is accessed by using the menu option Edit  | ScaleTo.

This command will compress or expand the present data ranges to the values that you enter in the dialog box.  The values that originally appear in the box are the minimum and maximum for each of the three axes.

The [image] button will scale the data and auto-scale the axes buttons.  This allows the entire new waveform to be on the graph.

see also:

Command Reference


edit mode command
Edit Mode

The edit mode command will place WinTab into edit mode.  Edit mode is the mode where data points may be manipulated, moved with the mouse, changed using the Position Box, and analyzed using the analysis tools.

Edit mode is accessed either by using the right mouse button toggle (if appropriate), by using the menu option Mode | Edit, or by using the ALT+E speed key.

If the autosort points option is selected, then the points are sorted as they are moved.  This way, points may be input in any order and still come out as a real function (e.g. y=f(x), x2 >= x1).

Some functions can not be accessed unless edit mode is active.

see also:

Line Mode , Insert Mode , Command Reference , Point Color , Point Size , Autosort Points , Mouse , Status Box


line mode command
Line Mode

The line mode command will place WinTab into line mode.  Basically, this mode will play 'connect the dots' with the data.  This is useful when dealing with sparse data sets.  The right mouse button may be used to toggle quickly between this mode and another mode (whatever the last mode was).

Line mode is accessed either by using the right mouse button toggle (if appropriate), by using the menu option Mode | Line, or by using the ALT+L speed key.

If points were selected in edit mode then they will display as a different color when in line mode.  These points may then be moved using the mouse by pressing the left mouse button and dragging the curve.  You may find it helpful to have autosort turned on when moving the lines this way.

see also:

Edit Mode , Insert Mode , Command Reference , Clipboard Metafiles , Line Color , Line Size , Mouse , Status Box , Save Settings command


insert mode command
Insert Mode

The insert mode command will place WinTab into insert mode.  Insert mode is the mode where data points may be input using the mouse or the graphics tablet.  Points are entered by clicking on the left mouse button or by clicking the graphics tablet cursor.

Insert mode is accessed either by using the right mouse button toggle (if appropriate), by using the menu option Mode | Insert, or by using the ALT+I speed key.

If the autosort points option is selected, then the points are sorted as they are input.  This way, points may be input in any order and still come out as a real function (e.g. y=f(x), x2 >= x1).

see also:

Line Mode , Edit Mode , Input , Command Reference , PointColor , Point Size , Autosort Points , Mouse , Status Box , Save Settings command


Analysis Tools

There are several analysis tools to examine the data:

Find a point when x2 < x1 in {(x1,y1),(x2,y2)}

Find a point when x2 = x1 in {(x1,y1),(x2,y2)}

Find a point when (x1,y1) = (x2,y2)

Find the global maximum of the data

GMax(y,{(x1,y1),(x2,y2),...,(xn,yn)})

Find the global minimum of the data

GMin(y,{(x1,y1),(x2,y2),...,(xn,yn)})

Find the next local maximum of the data starting

from the currently selected data point

Find the next local minimum of the data starting

from the currently selected data point

The Global maximum is also a Local maximum and the Global minimum is also a Local minimum.  For the local minima and maxima calculations, the currently selected point is the starting point of the analysis.  To select a point, use the mouse.

The coordinates of whatever point is selected are displayed in the Position Box.

The x2=x1, x2<x1, and (x2,y2)=(x1,y1) options compare only adjacent points.  If the data is sorted then  the x2<x1 case will never occur.

Note:	the analysis tools are only accessible when in edit mode

since the result of the analysis tools is to select a data point.

see also:

Command Reference , Input , Output , Speed Keys


clear command
Clear (Delete) Command

The clear command will erase the currently select data point(s).  Note that to use Clear (Delete), you must be in edit mode AND have one or more points selected.

Multiple data points may be selected using the mouse or keyboard.

The cut command will do the same thing as the clear command except that it will also send the data to the clipboard.

see also:

Cut , Paste , Copy , Selecting Data , Command Reference


zoom command
Zoom Box

The zoom box will allow the user to magnify a portion of the screen in the vicinity of the mouse cursor.  The magnification level is selectable by using the system icon in the zoom box.  The zoom box size may be changed using the Windows window boarder although making a large zoom box is degrades the performance significantly.

Hit ALT+Z to activate the zoom box or use the Utility | Zoom command.  As the cursor moves around on the screen, a small section around the cursor is magnified in the zoom box.  The cursor does not appear in the zoom box but is physically in the middle of the zoom box display.

To remove the zoom box, hit ALT+Z again, or use Utility | Zoom command or select Close from the zoom box's system menu.

see also:

Clipboard Bitmaps , Save Settings command , Speed Keys , Command Reference


position command
Position Box

The position box will allow the user to monitor and adjust the coordinate values of a data point.

Hit ALT+P to activate the position box or use the Utility | Position command.  As a data point moves around on the screen (using the mouse and the left mouse button), the coordinates of the point are updated.  The user may also adjust the coordinates of the point manually by modifying the text in the edit fields.  The text value may be reset to it's original value by using the Restore button.

The Accept button will set the points coordinates so that subsequent Restore operations will set the coordinates back to the Accepted value.  Coordinate values may be changed by typing new values in the coordinate boxes and pressing the ENTER key.

For the time being, the Restore button will serve as the Undo feature.

To remove the position box, hit ALT+P again, or use Utility | Position command or select the close button from the position box.

see also:

Data Formats , Save Settings command , Speed Keys , Command Reference


status command
Processing Status Box

The status box will allow the user to monitor the status of long processing operations.  The status of the present job is displayed as a percentage (0% to 100%).

Use the Utility | Status command to active the status box.  As lengthy commands are processed, the completion percentage is displayed in the status box.

The Help button in the status box brings up this screen.

To remove the status box, use Utility | Status command or select the close button from the status box.

see also:

Save Settings command , Command Reference


autosort points command
Autosort points

The position box will allow the user to monitor and adjust the coordinate values of a data point.

Hit ALT+A to activate autosort points or use the Utility | Autosort command.  As data points move around, are added, or are removed, the order of the points is adjusted so that they are in increasing order.  It is suggested that autosort points be turned off before pasting data into WinTab from unknown sources.  The data may then be edited in it's native order and then sorted.

see also:

Speed Keys , Paste from clipboard , Save Settings command , Position Box , Status Box , Command Reference


rescale axes command
Rescale axes

The rescale axes command will resize the axes extents so that the axes exactly match the extent of the data.

Use the Utility | Rescale command to rescale the axes.  The graph and axes will change as will the data values in the on screen axes buttons.  The minimum and maximum values will be detected from the data and placed in these on screen buttons.

see also:

Speed Keys , Command Reference


Smooth command

The smooth command will interdigitate new points into the existing data to create a curve with fewer discontinuities (i.e. smoother) than the original.  This command may be used many times to get a smoother and smoother curve.

Hit ALT+S to activate autosort points or use the Utility | Smooth command to smooth the axes.  Additional points will be introduced between existing points using a cubic spline function.  The existing points fall on the spine as do the new points.  The smooth command can be undone by the unsmooth command.

see also:

Speed Keys , Unsmooth command , Status Box , Command Reference


Unsmooth command

The unsmooth command will remove every other data point in the data.  This has the effect of undoing the smooth command.  This command may be used many times to get a coarser and coarser curve.

Hit ALT+U to activate autosort points or use the Utility | Unsmooth command to unsmooth the axes.

see also:

Speed Keys , Smooth command , Status Box , Command Reference


resample points command
Resample Points

The resample points dialog box will allow the user to change the sampling rate of the data.  The current sampling rate is displayed along with the number of data points.  The minimum sample spacing (sampling interval) is also displayed.   Data may be entered in the sampling rate boxes and the number of points box.  As data is entered, the other fields are updated.  The average sampling rate is (xmax-xmin)/num_points.  There are two forms of the sampling rate:

samples / unit (ex. samples per second: 11000)

units / sample (ex. time between samples: 9.091E-5 seconds/sample)

The other version of this command (Use DeltaMin) will extract the minimum abscissa increment from the data and use that as the sample spacing.  A few internal routines use this method to convert unequally spaced data to equally spaced data when required.

The resample points command is used to convert unequally sampled data into equally sampled data or to prepare the data for output to a multimedia sound device or to save in a equally spaced data file.

New data points are introduced if the new number of data points is greater than the previous number of data points.  The old data points are not necessarily preserved.  If the new number of data points is less than the old number, then points are removed.  The old data points do not necessarily remain at that old data locations.

Use the Utility | Resample command to change the number of samples or the sample interval.  The extent(range) of the new data equals the extent of the old data.  To change the extent.  Introduce a new point at the end (and/or beginning) of the data before calling the resample command.

see also:

Equally spaced data formats(SIG) , Sound generation , Status Box , Command Reference


Plot types
Plot Type

The plot types available in WinTab are:

rectangular plot (y=f(x) on a Cartesian grid)

polar plot(r=f(theta) on a concentric circular grid)

The on screen buttons in rectangular mode are the minimum and maximum of the abscissa and ordinate axes.  In polar mode, the minimum and maximum abscissa represent the angular extent while the ordinates correspond to the radii extent.

Use the Mode | PlotType | Rectangular or the Mode | PlotType | Polar commands to select rectangular or polar plotting mode.

see also:

Speed Keys , Axes Buttons , Save Settings command , Data Types , Command Reference


Data types
Data Type

The data types available in WinTab are:

rectangular data, y=f(x)

polar data, r=f(theta)

The data type selector allows the user to tell WinTab what type of data this is.  This is useful because both rectangular and polar data may be presented on rectangular and polar plots (with polar data on rectangular plots being more common than rectangular data on polar plots).  Also, this option is used when reading in data from the disk and WinTab guesses the wrong format.

Use the Mode | DataType | Rectangular or the Mode | PlotType | Polar commands to select rectangular or polar data types.

Specifying the data type is import for polar data when converting between degrees and radians or when presenting the data on a polar plot.  The degree/radian commands are not accessible when the data is rectangular.

see also:

Speed Keys , Axes Buttons , Command Reference , Save Settings command , Data Formats , Plot Types


radians/degrees command
Degree/Radian conversion

These commands are used to convert between radian and degree abscissa polar data.

The radian to degree conversion will multiply the abscissa by 180/pi while the degree to radian conversion will divide by 180/pi.

This option is only active for polar data.

Use the Utility | Degrees to Radians or the Utility | Radians to Degrees commands to convert from degrees to radians or radians to degrees.

Converting from one type to the other is import for polar data when converting between degrees and radians or when presenting the data on a polar plot.  The degree/radian commands are not accessible when the data is rectangular.

see also:

Speed Keys , Axes Buttons , Command Reference , Data File Formats , Data Types(Polar/Rectangular)


degrees

A degree is a unit of angular measure

used is polar measurements.  There are

360 degrees in a full circle and are usually

specified from 0 to 360 or from -180 to +180.


radians

A radian is a unit of angular measure

used is polar measurements.  There are

2 pi (6.28) radians in a full circle and are usually

specified from 0 to 2 pi or from -pi to +pi.


Edit Keys

arrow keys

backspace

delete

home

end

SHIFT+home

SHIFT+end

CTRL+home

CTRL+end

Cut, SHIFT+DELETE, CTRL+X

Copy, CTRL+INSRT, CTRL+C

Paste, SHIFT+INSERT, CTRL+V


pixels

A pixel is the smallest complete picture element

that a given monitor can display.  Color pixels

are composed of red, green, and blue dots and

thus it takes three dots to make a color pixel.

Gray scale pixels are composed of only one

dot.  The pixel size is determined by the monitor

type and Windows driver type.  Typical screen

sizes are:

640 x 350 pixels

640 x 480 pixels

800 x 600 pixels

1024 x 768 pixels


The cos( ) function is the trigonometric cosine function

where the cosine of an angle is equal to the x

component of the unit vector at that angle

The sin( ) function is the trigonometric sine function

where the sine of an angle is equal to the y

component of the unit vector at that angle

The sqrt( ) function is the square root function

if y = sqrt(x) then x = y*y

The atan2( ) function finds the angle of the vector

specified with x and y components.  Thus if x

and y form a unit vector then cos(atan2(y,x)) = x

and sin(atan2(y,x)) = y.  atan2 specifies the

resulting angle unambiguously from 0 to 360

degrees (or -180 to +180).


Angle type specifier commands
Angle Type

There are two angle types in WinTab: radian and degree.

This option allows the specification of the type of polar data.  This is useful when the data is first read in from the disk or as it is being created when a radian/degree type does not exist.  This option is different from the radian/degree conversion in that the angle type commands just set the type, there is no changing of the data values.

This option is only active for polar data.

Use the Mode | Degrees or the Mode | Radians commands to specify the angular type.

see also:

Speed Keys , Axes Buttons , Command Reference , Save Settings command , Data File Formats , Data Types , Converting between radians and degrees


Rectangular/Polar conversion commands
Rectangular/Polar conversion

The rectangular and polar conversion routines convert between WinTab's native modes.

The option which is active depends on the data type (Rectangular or Polar) that is specified.

Use the Utility | Rect2Polar or the Utility | Polar2Rect commands to convert between the two types.

The conversion factors used are:

x = r*cos(theta)

y = r*sin(theta)

r = sqrt(x^2 + y^2)

theta = atan2(y,x)

see also:

Speed Keys , Command Reference , Data Formats , Converting between radians and degrees


color selection command
Color Selection Box

This dialog box allows the user to select the colors for the various items in the WinTab environment.  Use the Setup | Color command to activate this box.

The selection process consists of:

first select the item

then select it's new color

The primary colors appear as direct selections.  Arbitrary colors may be specified by selecting the RGB option and then selecting a color from the list box.  The values that fill the list box are read from an external file.  The values are three integers separated by spaces in the range from 0 to 255:

128  42  237

The color selections are stored in the initialization file and are read in on subsequent executions of WinTab.

Use the Setup | Color command to change the display colors.

see also:

Command Reference , Save Settings command , External Files , Point Size , Line Size


function generator command
Function Generator

This window allows the user to generate an arbitrary function and place it into the WinTab environment.  Use the Utility | Function Generator command or ALT+F to activate this box.  Use the same command to remove the box or press the Cancel button

The selection process consists of:

first select a waveform type from the radio buttons in column 1

then select the properties for that function

repeat this process for columns 2 and 3 if you are adding two waveforms or using one waveform as an envelope for another.

The active radio button for the desired function and column is highlighted.  The parameters in the edit fields coorespond to that radio button's function.

Press the View button to display the waveform in the WinTab environment.  Press the Cancel button to abort the process.  Pressing the OK button will place the data into the WinTab environment using the selected placement method (insert, interdigitate, add, replace).

Waveforms may be placed in the data set in 4 ways:

1. Insert

This will slide the existing data over to make a place for the new data to be inserted.  No data is lost performing this operation.

2. Interdigitate

This will intermix existing data with new data.  No data is lost performing this operation.

3. Add

This will mathematically add the new data values to the existing values.  No data is lost performing this operation but the previous data and the newly added data are inseperable.

4. Replace

This will place the new data on top of the old data there by removing the old data.  The old data that is contained in the range of the new data is lost.

Functions in columns 2 and 3

If you are using the additional functions in columns 2 and/or 3, you may use the Add or Envelope options to control the function that you have in column 1.

To create a sine wave with a fundamental frequency of 1 Hz and an amplitude of 0.9 with a 20 Hz sine wave with an amplitude of 0.1 riding on top of this, you would use the add function:

To create a 1 Hz sine wave modulating a 20 Hz sine wize, you would use the envelope function:

Musical Notes

The Table button will display a popup box showing the standard musical notes and the corresponding frequencies.  You may also input the notes into the Frequency edit field directly using the following format:

Nmo

Where N is the main note (C, D, E, F, G, A, B), m is a modifier ('#' for sharp and 'b' for flat) and an optional octive number ( 0, 1, 2, 3, ...).  Examples:

C     Db      F#5     Ab3    Bb0    C#1

The default octive is 4; the octive that contains middle C.

Lock Boxes

Next to each edit field is a small Lock box.  This box will lock the field so that WinTab will not modify the value that you place there.  You may modify the value at any time reguardless of the state of the Lock box.  This feature is necessary because WinTab will adjust the values in the edit fields based on values that you supply in other edit fields.

If you lock too many edit fields, then a warning message will appear.

Duty Cycle

The Square Wave and Triangle Wave functions can have duty cycles specified for them.  If duty cycle is specified, then the function will be a positive going wave only.  If a duty cycle is not specified, then the function will be positive and negative.

Double Exponential α and β values

When using the Double Exponential function, it is necessary to supply the values for alpha and beta used in the function:  exp(α*t)+exp(-β*t).  If you know the rise time and decay time for this function, then use the [image] button to determine alpha and beta.

see also:

Command Reference , Save Settings command , Input , Line Size , Line Color


line size command
Line Size

The line size may be changed for the lines in the WinTab environment.  Use the Setup | Line command to select the size.  The numbers shown are the widths (in pixels) of the line.  A width of 1 corresponds to a 1 pixel wide line.  High resolution screens should use a size 2 or 3 line while low resolution screens can use a size 1 or 2 line.

The line size selections are stored in the initialization file and are read in on subsequent executions of WinTab.

Use the Setup | Line command to change the line size.

see also:

Command Reference , Save Settings command , External Files , Line Color , Point Size


point size command
Point Size

The point size may be changed for the points in the WinTab environment.  Use the Setup | Point command to select the size.  The numbers shown are for the diameter (in pixels) of the point.  A diameter of 1 corresponds to a 1 pixel point.  High resolution screens should use a size 3 or 5 point while low resolution screens can use a size 1 or 3 point.

The point size selections are stored in the initialization file and are read in on subsequent executions of WinTab.

Use the Setup | Point command to change the point size.

see also:

Command Reference , Save Settings command , External Files , Point Color , Line Size


save settings command
Save Settings

The environment settings may be saved into the initialization file.  Use the Setup | SaveSettings command.

The point size, line size, colors, pop up box status, and other selections are stored in the initialization file and are read in on subsequent executions of WinTab.

see also:

Command Reference , External Files ,  Colors , Line Size , Point Size , Zoom command , Position command , Function Generator , Autosort points , insert mode , edit mode , line mode , Angles , Rectangular Data , Polar Data , Status Box


button(axes)
Axes Buttons

The axes buttons on the WinTab environment are used to adjust the values of the axes buttons.  These buttons are labels for the minimum and maximums of the abscissa and ordinate axes.  After changing the values in the buttons, the graph is adjusted to reflect the new values.

To change a value for an axis, use the left mouse button to click on the axis button.  A small vertical cursor will appear at the start of the number.  You may type in the new number and erase or edit the old number using the standard Windows text edit field keys.  After you have finished editing the number, just push the <ENTER> key.

see also:

Mouse commands , Graphics tablet , Input


mouse command
Mouse Operation

The mouse is used extensively in WinTab to control the input of data points and the operation of the menu structure.  Although the keyboard is also used to control the menu command structure and the graphics tablet can be used for input, the mouse is used exclusively to graphically move the data points.

The left mouse button is used to select/move data points when in edit mode or to enter new data when in insert mode.  The right mouse button is used to toggle from the current mode to the previous mode (i.e. between line mode and edit mode, edit mode and insert mode, or insert mode and line mode).  Clicking the right mouse button toggles back to the previous mode.  Notice that this definition is different from Microsoft's new API guidelines for Windows 3.1.  Presently the middle mouse button is not used for anything.

To select a point, first make sure that you are in edit mode (use ALT+E or Mode | Edit).  Then move the mouse to a data point and press and hold the left mouse button.  If all you want to do it select the point, then release the mouse button.  If, on the other hand, you would like to move the point, then continue to hold down the mouse button and mouse the mouse.  What is actually happening is that you are dragging the point along with the mouse cursor.  You may release the mouse button when the point is in the desired location.

To insert a point, first make sure that you are in insert mode (use ALT+I or Mode | Insert). Then move the mouse to the desired location and click the left mouse button.  A small white point will appear.

When inserting or editing points you may find it useful to pop into line mode to see how you are coming along and then pop back into insert/edit mode to continue.  This is the function of the right mouse button.

see also:

Speed Keys , Command Reference , Zoom box , Input , Position box


graphics tablet command
Graphics Tablet Operation

The graphics tablet driver used by WinTab is a Summagraphics compatible system and communicates through the PC's serial communications ports.  The suboptions to the tablet command are COM1, COM2, COM3, and COM4.  This designates which port the tablet is connect to.

After selecting the correct Com port and after the tablet is configured, the next set of windows instructs the user to enter the graph axes information USING THE GRAPHICS TABLET.  Use the tablet cursor's button to select the minimum/maximum values on the x and y axes.  Then set the WinTab axes button values to match those of the graph paper.  A pop up box will remind you to set the axes buttons.

After setting up the axes, you may use the graphics tablet to enter data points at any time.  To enter data properly, avoid rescaling the axes or changing the axes buttons after entering the first data points.

When changing to a new graph, reselect the Com port and reenter the values using the graphics tablet then adjust the axes buttons accordingly.

The following Summagraphics commands are used to communicate with the graphics tablet through the serial port (at 9600 bps, 8, n, 1):

Reset	'\0'

Check Tablet	'x'

Point Mode	'B'

see also:

Speed Keys , Command Reference , Input


Appendix I
Appendix I -- internal data classes

There are several internal classes used by WinTab.  The following list summarizes the major components:

class Points {

            private:

float x;

float y;

float z;

float& element(int i=0){

// given i from 0 to (numelements()-1), return

// that component of the point

}

int numelements(){

// return the number of components in this point.

// this is the same for all points and is adjusted statically

}

           public:

//default constructor (use initializer instead of assignment)

Points()  { }

// other constructors

Points(const float thex, const float they=0, const float thez=0, const float thew=0)  { }

Points(const LONG lParam) {

// given a LONG, assign the X component to the LOW() part and the Y component to the HIGH() part

}

//copy constructor

Points(const Points &thepoint){ }

//destructor

~Points(){ }

// assignment operator

Points& operator=(const Points &thepoint){ }

BOOL operator==(const Points &thepoint){

// see if the current point is not equal to 'thepoint'.

// return FALSE if they are not equal, TRUE if they are equal

}

BOOL operator!=(const Points &thepoint){

// see if the current point is not equal to 'thepoint'.

// return TRUE if they are not equal, FALSE if they are equal

}

huge Points& operator[](long int index){

// need to specify a large [ ] operator

}

void draw(HDC hdc) {

// draw the point using the default RGB Point color

}

float X() const { } // return the X component of the point

float Y() const { }

float Z() const { }

float mag() const {

// return the magnitude

}

float phase() const {

// return the phase in radians

// Note:  this is presently defined for only the first two components

}

// some operators

Points& operator+=(const Points& thepoint){

// this uses '+'

}

Points& operator-=(const Points& thepoint){

// this uses '-'

}

friend Points operator+(const Points& z1, const Points& z2){

// (a,b,c) + (e,f,g) == (a+e, b+f, c+g)

}

friend Points operator*(const Points& z1, const Points& z2){

// (a,b,c) * (e,f,g) == (a*e, b*f, c*g)

}

friend Points operator-(const Points& z1, const Points& z2){

// (a,b,c) - (e,f,g) == (a-e, b-f, c-g)

}

friend Points operator/(const Points& z1, const Points& z2){

// this uses /= to divide one point by another

}

Points& operator/=(const Points& thepoint){

// divide the current point by 'thepoint'

// divide by zero checking is included

// (a,b,c) / (e,f,g) == (a/e, b/f, c/g)

}

Points& operator*=(const Points& thepoint){

// this is the multiply operator; A=(a,b,c), b=(e,f,g)

// A *= B;

// A == (a*e, b*f, c*g)

}

float dot(const Points& z1){

//this is the 'dot' operator; (a,b,c)*(e,f,g)=ae+bf+cg

}

Points& one(void) {

// returns (1,1,1)

}

Points& one(float value, const Points& constraint){

// returns (1,value,1) if constraint==(0,1,0)

}

};

class Rects {

// Rects is compatible with RECT except that we can store floats in a Rects while RECT is an int (0 -> 32767).

// Since a RECT is public, then we will make Rects public also

           public:

float left;

float right;

float bottom;

float top;

//default constructor (use initializtion instead of assignment)

Rects()  { }

// other constrcutors

Rects(const float theleft, const float theright=0, const float thebottom=0, const float thetop=0)  { }

Rects(const Points& lowerleft, const Points& upperright) { }

Rects(const RECT& rect) { }

//copy constructor

Rects(const Rects &therect){ }

//destructor

~Rects(){ }

// assignment operator

Rects& operator=(const Rects &therects){ }

// conversion operators

operator tagRECT(){

// convert a RECT to a Rects

}

operator Points(){

// if someone only wants one part of the rects then give them the starting point

}

Points bottomleft()  const {

// return the bottom left point

}

Points bottomright() const {

// return the bottom right point

}

Points topleft()     const {

// return the top left point

}

Points topright()    const {

// return the top right point

}

float width() const {

// return the width of the rect

}

float height() const {

// return the height of the rect

}

BOOL operator==(const Rects &therect){

// see if 'therect' is equal to our rect

}

};

class Grid {

           private:

Rects  rect;	// the amount of space the grid uses

Points point;	// the intersection of the x and y axes

WORD   plottype;	// what type of grid this is

WORD   plotformat;	// what format the data is in on this grid

           public:

//default constructor (use initializer instead of assignment)

// in this case we will use assignment

Grid() {

}

// other constructors

Grid(const Rects therect, const Points thepoint, const WORD theplottype=IDM_RECTPLOT, const WORD theplotformat=IDM_RECTDATA)  { }

//copy constructor

Grid(const Grid &thegrid){

}

//destructor

~Grid(){ }

// assignment operator

Grid& operator=(const Grid& thegrid){

// copy one grid to another

}

void draw(HDC hdc){

// draw the grid using the existing conditions

}

// conversion operators

operator tagRECT(){

// return the size of the grid as a RECT

}

Rects getsize() const {

// return the size of the grid

}

Points getintersection() const {

// return the intersection point of the two axes making up the grid

}

// this is the grid look

void settype(WORD theplottype){

// set the plot format

// theplottype = IDM_RECTPLOT or IDM_POLARPLOT

}

WORD gettype(){

// return the plot format

// return - IDM_RECTPLOT or IDM_POLARPLOT

}

// this is the data look

void setformat(WORD theplotformat){

// set the plot data format

// theplotformat = IDM_RECTDATA or IDM_POLARDATA

}

WORD getformat() {

// return the plot data format

// return = IDM_RECTDATA or IDM_POLARDATA

}

};

class Button {

           private:

HWND   hwndButton;

HWND   hwndG;

HANDLE hInstanceG;

WORD   wParamG;

char   text[MAXLINE];

Rects  extent;

           public:

//default constructor (use initializer instead of assignment)

Button() {

}

//destructor

~Button(){

}

//check the button's status

BOOL IsActive(){

// if the user is doing something with the

// button then return TRUE, otherwise return

// FALSE.  Two buttons cannot be active at

// the same time.

}

/* the following functions are not presently used */

/*

void draw(){

// draw the button

}

void down(){

// push the button down

}

void up(){

// pull the button back up

}

BOOL IsDown(){

// see if the user is pressing the button

}

void blinkOn(){

// if the cursor in the text if off, then turn it on

}

void blinkOff(){

// if the cursor in the text is on, then turn it off

}

*/

//this will just calculate the size of the button 'if' it where to have some text in it

//this uses text that is assumed to be already cleaned up or RAW text

Rects getbuttonextent(const char* thetext){

}

// this will calculate a new button size based on the new text

// AND will update the button's extent

Points calcextent(const char* thetext){

// this calculates how big the button has to be to hold 'thetext'

}

void changetext(const char* thetext){

//this just changes the button's text and redraws it.  It doesn't resize the button

}

// fill the button with text and redraw it

void settext(const char* thetext){

}

// get the button's text

char* gettext(){

}

Rects& getextent(){

// return the extent of the button (starting and ending coordinates)

}

Points getsize(){

// Get the size of the button and put the values

// in 'x' and 'y' of the returned point

}

// manually hide the button (deletebutton() just undraws it)

void hide() { }

// given the starting point for the button, find the extent

void config(const Points& thepoint){  }

// move an existing button from place to place

void move(){

}

void enlarge(const Rects& newsize){

//in this case, we WILL redraw the button's interior

//the newsize is used while the old button starting location IS maintained.

// 'newsize' describes the extent of the button (lower left corner to upper right corner)

}

// show a button that may or may not already exist

void show(){

// draw the button using all of the defaults or pre-existing conditions

}

void show(const HWND thehwnd, const HANDLE thehInstance, const WORD thewParam,

const char* thetext, const Rects& theextent) {

//this assumes that the user knows how big he wants the button to be

}

void show(const HWND thehwnd, const HANDLE thehInstance, const WORD thewParam,

const char* thetext, const Points& thepoint) {

//if the user only knows the starting point, then use this form

}

};

class DataType{

           public:

//default constructor

DataType() {

// create the data type and assign some defaults

}

//a function that we will use in the constructors

void setformat(char *newformat){

// set the format of the data type to the value in 'newformat'.

// The format is a printf() style format string

// ex:   "%e %e"

}

//copy constructor

DataType(const DataType &thetype){

// create the data type and copy 'thetype' into the data type

}

//destructor

~DataType(){ }

//assignable constructors

// old format

DataType(BOOL boolY, BOOL boolXY, BOOL boolXYZ, BOOL boolTS, BOOL boolFS, float f_init, float f_delta, char *theformat){

// set the format type, include initial values, include delta values, and include the format string

// equally spaced data sets (TS and FS) use init and delta

}

// new format

DataType(int thetype, float f_init, float f_delta, char *theformat){ }

where:

thetype==0 is undefined

thetype==1 is Y

thetype==2 is XY

thetype==3 is XYZ

thetype==4 is TS

thetype==5 is FS

thetype==6 is WAV

additional types will be reserved for WKS, XLS, etc...

operator int(){

// if the data has some format (any format), return (int)TRUE

// otherwise return (int)FALSE.

}

BOOL IsSig(void){

// is this SIG format data?

// TRUE if Yes, FALSE if No

}

BOOL IsY(void)  {

// is this just 'y' (amplitude) data?

// TRUE if Yes, FALSE if No

}

char *getformat(){

// return the format (as a string)

// this is a printf() style format string

}

float getinit(){

// return the 'init' (initial) value for equally spaced data

}

float getdelta(){

// return the 'delta' value for equally spaced data

}

char *Points2Char(Points& thepoint){

// return a pointer to a character string version of 'thepoint'

}

friend DataType DetermineFormat(DataType& dtRef, DataType& dtIn, char delim);

};

class Graph{

           private:

Points huge *array;

// the [ ] operator in Points is overloaded to accepts longs as arguments

signed long int numpoints;

WORD wmode;

signed long int selected;

BOOL bSelected;

DataType datatype;

signed long int maxsizePtsBuf;

HGLOBAL hArray;

void huge * lpArray;

void setpoint(long int index, Points& thepoint){

//this is used by Sort() but should not be used by anyone else

}

friend BOOL Sort(Graph& thegraph);

           public:

//default constructor

Graph() {

// create space for the graph

// and set up the defaults

}

//memory reallocation function

// user's shouldn't have to use this function.

// As points are added, the resizing occurs automatically

BOOL Resize(long int newnumpts){

// increase the size of the graph to accodate new points

}

//copy constructor

Graph(const Graph &thegraph){

// copy 'thegraph' to graph during construction

}

//destructor

~Graph(){

// deallocate memory and remove references and handles

}

//assignment operator (=)

Graph& operator=(const Graph &thegraph){

// copy 'thegraph' into the present graph

}

void empty() {

// clear the data points from the data set and deallocate the memory

// use by that data set

}

void check(long int &theindex) const {

// check that 0<=theindex<=numelements()-1

// if it isn't, then set it to the appropriate min or max value

}

long int operator++(){

// this is prefix

// make the point with an index one greater than the

//presently selected point's index the selected

//point.  Return the newly selected point's index.

}

long int operator--(){

// this is prefix

// make the point with an index one less than the

// presently selected point's index the selected

// point.  Return the newly selected point's index.

}

long int operator++(int){

// this is postfix

// make the point with an index one greater than the

//presently selected point's index the selected

//point.  Return the old selected point's index.

}

long int operator--(int){

// this is postfix

// make the point with an index one less than the

// presently selected point's index the selected

// point.  Return the old selected point's index.

}

Graph& mult(const Points& thepoint){

// multiply every element of the graph by 'thepoint'

}

Graph& operator+=(const Graph& thegraph){

// add 'thegraph' to the present graph

}

void addpoint(const Points& thepoint){

// include this new point in the data set

}

void deletesel(){

// delete the presently selected point from the data set

}

void deletepoint(const Points& thepoint){

// delete the point CLOSEST to 'thepoint'

// Bug:  The presently selected point is not maintained

}

void deletepoint(long int pointnum){

// delete the point with index 'pointnum'

// 0 <= pointnum <= numelements()-1

}

Points selectpoint(long int pointnum){

// make the point with index 'pointnum' the presently

// selected point.  0 <= pointnum <= numelements()-1.

// return the point that was actually selected.

}

void unselectpoint(){

// deselect the currently selected point

// e.g. isselected() will now return FALSE

}

Points selectpoint(const Points& thepoint){

// find a point in the data set CLOSEST to 'thepoint'.

// return the point that was actually selected.

}

Graph& operator+=(const Points& thepoint){

// add 'thepoint' to the graph

// i.e. include this new point in the data set

}

BOOL isselected() {

// this will return TRUE if a point is selected,

// FALSE otherwise

}

BOOL issorted(const Points& comparison=Points(1,0,0)){

// this will determine if the points are already sorted.  Is is quicker

// to ask then to just blindly sort

// comparison is the BOOL search flag (i.e. (1,0,0) will see if the data

// is sorted in 'x', (0,1,0) will see if the data is sorted in 'y', and

// (0,0,1) will see if the data is sorted in 'z')

}

long int getselected() const {

// the presently selected point index is returned (0 to numelements()-1)

// if no point is selected, then 0 is returned

}

long int numelements() const {

// return the number of points

// max_index = numelements() -1

}

long int maxnumelements() const {

// the user should really never use this function

// Resize() uses this function

}

void undrawsel(HDC hdc){

// this function really only makes sense with EDTMODE

// this function erased the point from the screen (but NOT from the data set)

}

void drawsel(HDC hdc){

// this function really only makes sense with EDTMODE

// this draws the presently selected point

}

void erasesel(HDC hdc){

// this function really only makes sense with EDTMODE

// the presently selected point is erased (both from the screen and from the data set)

}

void draw(HDC hdc, BOOL bCirclize=FALSE, ColorRefs color=RGBNull){

// bCirclize determines if we will use circles or pixels to draw our points.

// metafiles are the only ones that use circles

// line mode ignores the value in color

}

void setmode(WORD themode){

// set the mode to that specified by 'themode'

}

void setformat(const DataType& thetype){

// set the format to that specified by 'thetype'

}

DataType getformat(){

// return the present format

}

WORD mode(){

//return the present mode

}

void setheader(const Graph& thegraph){

// set the header of this graph to the header value in 'thegraph'

}

Points getpoint(long int theindex) const {

// return the point value corresponding to 'theindex'

}

void movesel(HDC hdc, const Points& thepoint){

// this will move the currently selected point to a new location specified by 'thepoint'

}

long int GMax(Points comparison=Points(0,1,0)) const {

//comparison is a BOOL point telling us which comparison to make (x, y, or z)

//the default is .Y() comparison

// the index of the maximum value is found, otherwise -1

}

long int GMin(Points comparison=Points(0,1,0)) const {

//comparison is a BOOL point telling us which comparison to make (x, y, or z)

}

long int LMin(long int istart, Points comparison=Points(0,1,0)) const {

// the index of the found point is returned, otherwise, -1

// istart+1 is the index where we will start looking

//comparison is a BOOL point telling us which comparison to make (x, y, or z)

}

long int LMax(long int istart, Points comparison=Points(0,1,0)) const {

// the index of the found point is returned, otherwise, -1

// istart+1 is the index where we will start looking

         	//comparison is a BOOL point telling us which comparison to make (x, y, or z)

}

void removedup(const Points constraint=Points(1,0,0)){

         // it is assumed that the points are sorted BEFORE calling this function

}

};

see also:

Command Reference , Table of Contents , Appendix II , Appendix III


Appendix II
Appendix II -- Registration

WinTab is freeware.  Send no money.  However, you may not modify the WinTab executable code.  Also, if you wish to give the code to others, make sure that you give them all of the associated data files.

If you do have suggestions or ideas for new functions, then code up those functions (in C or C++) using the information provided in Appendix I and send the source code to me via E-mail (use the Help | About option to get the current e-mail address).  If possible, I will include them into WinTab and let you know about the additions.

When you locate bugs in WinTab, please forward those to me via E-mail.

Ideology

The goal is to make WinTab a general purpose low level waveform manipulation program using a graphical user interface.  The internal data format is generic enough to handle many instances.  WinTab also has a few bells and whistles to spice it up but otherwise it is a fairly simple code.  WinTab is not a replacement for many higher level packages but was designed to fill a few niches:

1. input data using a mouse and a graphics tablet

2. manipulate data graphically

3. convert between data and Windows metafiles

4. perform mathematical and/or graphical operations on arbitrary data

Also, I would appreciate any feedback on the hardware compatibility issues in using WinTab.  Specifically in using the multimedia devices and other graphics tablets.

see also:

Command Reference , Table of Contents , Appendix I , Appendix III


Appendix III
Appendix III -- Bug list

When you find bugs in WinTab, please send those to me via E-mail (use the Help | About option to get the current e-mail address).

The performance slows down when using more than 200,000 data points.

The initial startup screen sometimes only shows 1 axis button at startup.  Push the right mouse button twice to refresh the display.  This intermittant problem will be tracked down and fixed in the next release.

Currently, resolution is limited to 6 parts / 1000000 full scale.  i.e. if ymin=1.234567 and ymax=1.234568 then the graphical resolution is discretized to about 6 levels between these two numbers.  This is due to machine round off error (in the right most decimal place).  The absolute magnitude of ymin and ymax is not important.  This problem only occurs when ymax is almost identical to ymin (i.e. ymax/ymin = 0.99999 to 1.00001).  The same holds true for xmin, xmax, r_min, r_max, theta_min, theta_max, etc.

The F1 key (used for context sensitive help) simulates the user pressing the ENTER key.  Thus, the operation is not 'user-friendly' when non-end-result items are selected.

I.E. if File is selected from the main menu bar but the drop down menu has not appeared yet (by pressing the ALT key), then pressing F1 will not generate help for File but will cause the drop down menu to appear.  Pressing the F1 key when accessing the System Icon is not intercepted by the F1 processing routine and instead that system command is executed.  A better F1 detector will be implemented in the future.

The drawing routine [Graph::draw()] presently draws every point sequentially.  Control is not returned to Windows until all of the points are drawn.  This routine will be modified in the future to do some or all of the following:

draw every nth point

draw points only when the local derivative is large

check Windows for messages while drawing the points (via PeekMessage())

see if the user hit the ESC key or pressed a mouse button to abort drawing

The hourglass is not always displayed while WinTab is thinking.  This will be corrected in a general sense in the next version.  For now, if WinTab does not seem to be responding; press the ALT key and wait for a menu bar highlight.  This will probably be corrected in the future.  Additionally, a dialog status box will appear indicating how long of a wait is expected by showing the status (as a %).

The Paste routine does not automatically rescale the axes (the Open function does).  Thus if you Paste (Edit | Paste) some data in, you may not be able to see it.  This is especially a problem with pasting in WAV files.  To see all of the data, use Utility | Rescale.  This problem may be corrected in future versions (with a dialog box asking about rescaling???).  Note that many third party WAV editors do not put standard format WAV info into the clipboard (they use a private format) and thus can not be supported.

The user can enter numbers in the Function Generator edit fields that generate an extremely large number of data points.  Functions will be added to trap these cases and report them to the user rather than having Graph::Resize() report the error in it's characteristically unfriendly way...

The Edit | Paste option is careless about support of the '\r' character for the end of a line.  Presently only '\r\n' and '\n' are supported.  However, File | Open does support '\r', '\n', '\r\n' and '\n\r' and thus works like it is supposed to.

WinTab will not play complex (i.e. Real + Imaginary) data through the multimedia device.  Take the magnitude, select the real part or add the real part to the imaginary part before selecting File | Play.  In the future, this will be how stereo sound is supported (real = left, imaginary = right).

The Function Generator's (Utility | FunctionGenerator) sinc function's number of cycles is off by 1.  This is due to the non-null at t=0.  The other parameters (freq, period, etc) are based on the waveform's shape away from 0.  i.e. When the number of cycles says 4, it should actually say 3 in the edit field when cycles are defined by zero crossings.  This 'feature' will probably not be modified.

If the menu choices that you want is grayed, make sure that you are not in the wrong mode -- i.e.  to do rectangular to polar conversion, you have to be in Rectangular mode.   To do analysis on the data there needs to be one or more data points.  Several functions require that you be in Edit mode.  etc.

The dynamic graying is not a bug but the issue of 'Modes' seems to be a little confusing to some people.   This will be clarified in the next release.

Microsoft Excel will not accept the .WAV files via the clipboard that WinTab generates.  Excel needs additional (unknown to me) formats inorder for sounds to be pasted in (probably a bitmap).  This will be corrected once an unambiguous convention is decided upon.

The 'ScaleTo...' option operates on all of the data even if only a subset of the data is selected.  This will be corrected in the next release.

The ResampleBox does not calculate the data spacing correctly if the waveform is not a function (i.e. y is not unique for each x).  This is because it uses    numpts = (xmax-xmin)*delta+1.  Correcting this will require finding the length of the curve which is much slower than just subtracting the max from the min.  This will be corrected in the next major release.

see also:

Command Reference , Table of Contents , Appendix I , Appendix II