added matlab version

Added textures directory.
Added matlab functions.
Changed tools.py