adaptive_area_preserving_map_open: Compute an adaptive area-preserving map of a simply-connected open surface to a spherical cap with optimized conformality 
adaptive_area_preserving_map_closed: Compute an adaptive area-preserving map of a genus-0 closed surface to a spherical cap with optimized conformality 

This code computes the adaptive area-preserving parameterizations of simply-connected triangle meshes using the method in [1].
Any comments and suggestions are welcome. 

If you use this code in your own work, please cite the following paper:
[1] G. P. T. Choi, A. Giri, L. Kumar, 
    "Adaptive area-preserving parameterization of open and closed anatomical surfaces."
    Computers in Biology and Medicine, 148, 105715, 2022.

Copyright (c) 2021-2022, Gary Pui-Tung Choi
https://math.mit.edu/~ptchoi

===============================================================

Usage:
[map,z_low_lim] = adaptive_area_preserving_map_open(v,f)
[map,z_low_lim] = adaptive_area_preserving_map_closed(v,f,lambda,bottom_coord)

Input:
v: nv x 3 vertex coordinates of a simply-connected open/closed triangle mesh
f: nf x 3 triangulations of a simply-connected open/closed triangle mesh
(Optional) lambda: balancing parameter for initial map
(Optional) bottom_coord: 1 x 3 coordinates of the bottom center of the mesh

Output:
map: nv x 3 vertex coordinates of the adaptive area-preserving parameterization
z_low_lim: the lower limit of the z-value of the sphere (everything is with z >= z_low_lim)

================================================================
Dependency:
- disk-conformal-map: for computing the initial disk conformal parameterization 
  https://github.com/garyptchoi/disk-conformal-map

- optimal-mass-transport: for computing the optimal mass transport map
  https://github.com/cfwen/optimal-mass-transport

- polybool_clipper: Polygon Functions for Octave & MATLAB (*** note: this part is in C/C++ and the user may need to build the mex functions first)
  https://sites.google.com/site/ulfgri/numerical/polybool/

- matGeom: Matlab geometry toolbox for 2D/3D geometric computing
  https://github.com/mattools/matGeom

- geometry-processing-package
  https://github.com/cfwen/geometry-processing-package

- Diskmap_SEM: A Novel Stretch Energy Minimization Algorithm for Equiareal Parameterizations
  https://math.ntnu.edu.tw/~yueh/code/Diskmap_SEM.zip