isolated code for computing from legacy format to new one
vector mode if there is no output arg
updated plot function to incorporate texture information
removed extra figure command
reorganized demo script to mirror PHP page