def write_view_matrix(inputFilename, outputFilepath):
    with open(outputFilepath, 'wb') as outFile:
        for (i, line) in enumerate(open(inputFilename, 'r')):
            coords = [float(x) for x in line.split()]
            if (len(coords) != 3):
                print(('Unable to parse line: %s ' % line))
                exit(1)
            mat = lookFrom(coords)
            print(mat)
            column_major_data = tuple((mat[i][j] for j in range(4) for i in range(4)))
            outFile.write(struct.pack(('f' * 16), *column_major_data))
def write_view_matrix(inputFilename, outputFilepath):
    with open(outputFilepath, 'wb') as outFile:
        for (i, line) in enumerate(open(inputFilename, 'r')):
            coords = [float(x) for x in line.split()]
            if (len(coords) != 3):
                print(('Unable to parse line: %s ' % line))
                exit(1)
            mat = lookFrom(coords)
            print(mat)
            column_major_data = tuple((mat[i][j] for j in range(4) for i in range(4)))
            outFile.write(struct.pack(('f' * 16), *column_major_data))