          
                         2D Vectors
            Copyright (c)2000, 2001  P. E. Schippnick

Files:
2D_Vectors.txt   this file
VECTOR.82P

Program title:  2D Vectors
Program name:   VECTOR

Variable use:
  X Real x coordinate
  Y Real y coordinate
  U Real temp X or R value
  V Real temp Y or theta variable value
  R Real Vector or Radius
theta Real Vector angle or Radius angle
  O Real set 0=Rectangular output, 1=Polar output


To run program select EXEC VECTOR
 prgmVECTOR

The screen comes up:

VECTOR INPUT
1:RECTANGULAR
2:POLAR
3:NEW (ZERO OUT)
4:SET OUTPUT
5:QUIT

To start it is recommended first to select NEW to zero output.
This sets Variables X and Y to ZERO (0).

So remeber to select 3:NEW (ZERO OUT) to start new calculations.

Selecting 1:RECTANGULAR
Will give you a delta X prompt for an incremetal X input.
Followed by a delta Y prompt for an incremental Y input.

Next you will get:

1:ADD
2:SUBTRACT

Selecting 1:ADD will add the new X and Y values to the old X and y values. Selecting 2:SUBTRACT will subtract the new X and Y values from the old X and Y values.

And depending on the mode will display:
for RECTANGULAR:

X        Y
0000000, 0000000
 
For POLAR:

R        theta angle mode degees or radians
0000000, 0000000

It should be noted all the answers are in NORMAL mode and FLOAT and are truncated and not rounded. Reset your calculator MODE to the number output you want, if different from NORMAL and FLOAT, and press ALPHA and the variable letter you want, X, Y or R or theta. And ENTER. This will give you your answer to the calculator display value. Re-running the program will set the number mode to NORMAL and FLOAT. If you have selected a variable to display you must press PROGRAM key and re-select VECTOR.

By pressing ENTER will restart program and bring up:

VECTOR INPUT
1:RECTANGULAR
2:POLAR
3:NEW (ZERO OUT)
4:SET OUTPUT
5:QUIT

Selecting 2:POLAR
Will give you an R prompt followed by a theta prompt.

Next you will get:

1:ADD
2:SUBTRACT

Selecting 1:ADD will add the new X and Y values to the old X and y values. Selecting 2:SUBTRACT will subtract the new X and Y values from the old X and Y values. Just as before.

By pressing ENTER we again restart the program:

VECTOR INPUT
1:RECTANGULAR
2:POLAR
3:NEW (ZERO OUT)
4:SET OUTPUT
5:QUIT

By selecting 4:SET OUTPUT you will get:

SET MODE
1:RECTANGULAR
2:POLAR

By selecting 1:RECTANGULAR you will get the last rectangular output and switch the output mode to this kind of output:

X        Y
0000000, 0000000
 
By selecting 2:POLAR you will get the last X and Y values from X0, Y0 in polar, and set the program to this kind of output:

R        theta angle mode degees or radians
0000000, 0000000

To continue vector calulation just re-press ENTER.

To change between degree or radian output use the calculator MODE to set your angle type. The program sets NORMAL and FLOAT.

______________________________________________________________________
Some sample problems:

Point 1: X=.254 Y=.375
Point 2: X=.5   Y=1.3

Find the distance between points.

First we will select 3:NEW
We will next enter the second point first:
Select 1:RECTANGULAR
Input the X then Y values of point 2.
Select 1:ADD
Press ENTER

Select 1:RECTANGULAR
Input the X and Y values of point 1.
Select 2:SUBTRACT

If the display has:

X        Y
.246   , .925

Then press ENTER and select 4:SET OUTPUT
Then select 2:POLAR

You should get

R        theta degees
.957152, 75.1871

or

R        theta radians
.957152, 1.31086

To convert your answers back to rectangular press ENTER and select 4:SET OUTPUT and select 1:RECTANGULAR. This also resets your program output back to this program mode. 

To switch your angle mode select MODE and select RADIAN or DEGREE. Then press CLEAR key. Pressing ENTER to re-run program, selecting 4:SET OUTPUT and then 2:POLAR. Remember to reset your RADIAN or DEGREE mode before selecting VECTOR INPUT 2:POLAR. The input must also be in the correct angle mode RADIAN or DEGREE or you may not get the expected  result. 

OK, with your calculator in the DEGREE mode.

Select 3:NEW then select 2:POLAR.

Enter for R -1.
Enter for angle 30.

Now select 1:ADD

Your answer should be:

R        theta angle degees
1      , -150

OK now press ENTER and select 2:POLAR
At the R prompt enter 2R or 2*R
At the theta prompt just enter the theta variable [ALPHA key 3].

Then select 2:SUBTRACT

Your new answer should be:

R        theta angle degrees
1      , 30

Press ENTER and select 3:NEW

Next select 4:SET OUTPUT and 1:RECTANGULAR

X        Y
0      , 0

OK, now let's enter a set of points.

Point 1, X .235  Y .735
Point 2, X -.1   Y .563
Point 3, X .701  Y -.05

Press ENTER select 1:RECTANGULAR
and enter first point.
Select 1:ADD

X        Y
.235   , .735
 
Press ENTER select 1:RECTANGULAR
and enter the second point.
Select 1:ADD

X        Y
.135   , 1.298

Press ENTER select 1:RECTANGULAR
and enter the third point.
Select 1:ADD

X        Y
.916  ,  1.248

Now from this point, you are on you own.

Remeber to select 3:NEW (ZERO OUT) to start new calculations.
______________________________________________________________________

Program was revised to fix display errors.
The display format as above except when a vector value is larger than 99.99999999 the display uses the format:

X=99
Y=1

For a vector value less than 100 [99.99999999].

X        Y
100   ,  0

______________________________________________________________________

If you have any questions about this program you can e-mail me at:
peschippnick@earthlink.net

THIS PROGRAM HAS BEEN MADE AVAILABLE -AS IS- WITHOUT WARRANTY OR GUARANTEE.