E-Code

Vectors: dot, cross, angle, projection — a TI-84 Plus CE program

By E-Code · updated

VECTOR3 is a TI-BASIC program for the TI-84 Plus CE. Type two 2-D or 3-D vectors: lengths, dot product, the angle between them in degrees, the cross product with the parallelogram and triangle areas, and the projection of U onto V.

What it asks for and what it shows

It asks for 2 values at its prompts. In the example below it shows LEN U, LEN V, U DOT V, CX, CY, CZ, AREA, TRIAREA, DEG ANG, PX, PY, PZ, SCALAR.

Example run

One of its oracle test cases: “3-D textbook”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Input 1{1,2,3}
Input 2{4,⁻5,6}
The screen shows
LEN U=3.741657387
LEN V=8.774964387
U DOT V=12
CX=27
CY=6
CZ=-13
AREA=30.56141358
TRIAREA=15.28070679
DEG ANG=68.56244697
PX=0.6233766234
PY=-0.7792207792
PZ=0.9350649351
SCALAR=1.367526918

How it's checked

6 test cases, each checked against an independent method. Replayed key by key on a virtual TI-84 Plus CE, they make 75 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-84 Plus CE math programs · All TI-84 Plus CE programs