		Map2Sphere

A tool for parameterizing genus zero surfaces onto the sphere

Installing Map2Sphere
=====================

Map2Sphere uses three external libraries, EIGEN, SUITESPARSE, and NANOGUI. 
All three libraries are OpenSource and therefore easily obtained. For simplicity,
I provide NANOGUI as part of the distribution (though it needs to be compiled);
EIGEN and SUITESPARSE need to be installed externally.

1) Installing packages on MacOS
-------------------------------
The easiest option on Mac is to use the package manager homebrew. If you do
not have homebrew and want to install it, follow the instructions from
https://brew.sh

Basically, you just have to type:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

from a terminal... and you will then be set with a wonderful package manager, 
accessible with the command "brew"

1.1) Installing EIGEN
-------------------
 Just type from the command line in a terminal:

brew install eigen

1.2) Installing SUITESPARSE
-------------------------
 Just type from the command line in a terminal:

brew install suite-sparse

1.3) Setting up NANOGUI
-------------------------

Inside the distribution of Map2Sphere,

cd dependencies/nanogui
rm -rf build
mkdir build
cd build
cmake ../
make

This should compile the whole library, generate the include directory, and create the lib files
needed by Map2Sphere

2) Compiling Map2Sphere
=======================

Go back to the main directory in Map2Sphere, and just type:

make all -j 4

This should fully compile Map2Sphere and put the executable Map2Sphere.exe inside the subdirectory
bin

NOTE: you will most like have to edit the Makefile and change the names of the directories
that contain Eigen, SuiteSparse, and gfortran (first part of Makefile)

3) Testing Map2Sphere
====================
Go into one of the examples directory, such as

cd examples/examples_simple

and then type:

../../bin/Map2Sphere -i spot.off

All the parameterization techniques implemented in Map2Sphere should work on this example...
