CODE
import java.util.Scanner;
public class VectorFinder
{
public static void main(String [] args)
{
//Set up Scanner object
Scanner in = new Scanner(System.in);
//declare variables
double ax;
double ay;
double az;
double bx;
double by;
double bz;
double cx;
double cy;
double cz;
//declare vector variable's
double vx;
double vy;
double vz;
double wx;
double wy;
double wz;
double nx;
double ny;
double nz;
//declare dot product variables
double VdotN;
double WdotN;
System.out.println("Welcome to the triangle vector finder program.");
//collecting the values
System.out.println("Enter Ax:");
ax = in.nextDouble();
System.out.println("Enter Ay:");
ay = in.nextDouble();
System.out.println("Enter Az:");
az = in.nextDouble();
System.out.println("Enter bx:");
bx = in.nextDouble();
System.out.println("Enter by:");
by = in.nextDouble();
System.out.println("Enter bz:");
bz = in.nextDouble();
System.out.println("Enter cx:");
cx = in.nextDouble();
System.out.println("Enter cy:");
cy = in.nextDouble();
System.out.println("Enter cz:");
cz = in.nextDouble();
//pinting out values
System.out.println("a=(" + ax +"," + ay + "," + az +")");
System.out.println("b=(" + bx +"," + by + "," + bz +")");
System.out.println("c=(" + cx +"," + cy + "," + cz +")");
vx = bx - ax;
vy = by - ay;
vz = bz - az;
wx = cx - bx;
wy = cy - by;
wz = cz - bz;
nx = vy * wz - wy * vz;
ny = wx * vz - vx * wz;
nz = vx * wy - wx * vy;
//dot product
VdotN = vx * nx + vy * ny + vz * nz;
WdotN = wx * nx + wy * ny + wz * nz;
System.out.println("v=(" + vx +"," + vy + "," + vz +")");
System.out.println("w=(" + wx +"," + wy + "," + wz +")");
System.out.println("n=(" + nx +"," + ny + "," + nz +")");
System.out.println("The dot product of b-a and n is " + VdotN);
System.out.println("The dot product of c-b and n is " + WdotN);
}
}
Ok so I posted here when I was just starting this program and got some good help. I am now finished, but it won't load on my computer. This is the error I receive
C:\Java\jdk1.6.

6\bin javac VectorFinder.java
javac: file not found: VectorFinder.java
Usage: javac <options> <source files>
use -help for a list of possible options
So looks like mabye nothing wrong with code just something else but I can't find what to fix. I have it saved In correct folder as VectorFinder.java
This post has been edited by jayman9: 8 Jun, 2008 - 09:00 AM