# Vector Calculator

This is a simple Java applet intended to give students a "feel" for vectors in two dimensions. Specifically, it covers components, magnitude and direction, and vector addition.

The idea is simple. If you view this page with a Java-capable browser, you will see, somewhere below these lines, a yellow grid labeled in units such that 1 unit = 10 screen pixels. By clicking and/or dragging within the central square (-10,10)x(-10,10), you can create a pair of vectors. As you click and/or drag, the components, magnitude and direction for the vector are displayed (the direction is given in degrees, positive for vectors in the first and second quadrant and negative for vectors in the third and fourth quadrant).

Once you have two vectors, clicking on the button labeled "Add" will display the vector sum (in magenta, or pink), and its components, magnitude and direction. Two auxiliary vectors are drawn in cyan (light blue) to help visualize the parallelogram; you can think of them as representing the original vectors, translated so as to perform the sum in a "tip-to-tail" fashion.

You may have to scroll down in your browser to see the buttons. A "Clear" button allows you to remove the last vector you added; an "All Clear" allows you to start all over again.

A deliberate design feature is that there is no way to enter the components, magnitude, or direction of a vector directly: you must do it graphically, by dragging with the mouse. Hopefully, this way you will develop a good feel for what all these quantities mean graphically.

If you can see this text (instead of the applet that's supposed to be here), it means your browser is not Java-enabled.

### Other stuff...

Prof. Michael Winokur, at the University of Wisconsin, has modified the applet so you can add three vectors. You can find his version here.

You can also e-mail me at jgeabana@comp.uark.edu with comments or questions. I can send you the source code if you're interested, although I'm afraid my programming style is anything but exemplary.