public class Point3D {
    public float x, y, z;           // coordinate of vertex
    public Point3D() {    }
    public Point3D(float xval, float yval, float zval) {
        x = xval;        y = yval;        z = zval;    }

    public String toString() {        return new String(" ["+x+", "+y+", "+z+"]");	}
	
	
	/////////////////////////// Methods ////////////////////////////
	
	public void normalize() {
				float magn = (float) Math.sqrt((x * x) + (y * y) + (z * z));
		x = x / magn;
		y = y / magn;
		z = z / magn;
	
	}
	
	
	public void crossProduct(Point3D vec1, Point3D vec2) {
		
		x = (vec1.y * vec2.z) - (vec1.z * vec2.y);
		y = (vec1.z * vec2.x) - (vec1.x * vec2.z);
		z = (vec1.x * vec2.y) - (vec1.y * vec2.x);				

	}}