Skip to content

Commit b90f67c

Browse files
committed
Added license
1 parent 03e961e commit b90f67c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2139
-39
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This method generates an approximately isometric parameterization of an input `o
1717
To install this project on a Unix-based system, use the following standard CMake build procedure:
1818

1919
```bash
20-
git clone https://github.com/rjc8237/penner-optimization.git
20+
git clone https://github.com/geometryprocessing/penner-optimization.git
2121
cd penner-optimization
2222
mkdir build
2323
cd build
@@ -27,7 +27,6 @@ make -j 4
2727

2828
## Usage
2929

30-
TODO Make binary folder
3130
The core parameterization method is `bin/optimize_metric`. This executable takes the following arguments:
3231

3332
|flag | description|
@@ -38,21 +37,21 @@ The core parameterization method is `bin/optimize_metric`. This executable takes
3837
|`direction` | Direction to use for descent|
3938
|`--num_iter` | Maximum number of iterations|
4039
|`--output` | Output directory|
40+
|`--show_parameterization` | Open polyscope viewer for the output|
4141

4242
Supported parameter values for `energy` and `direction` are listed by `bin/optimize_metric --help`.
4343

44-
The input mesh must be a manifold surface with a single connected component. The cone file must be a list of newline separated target vertex cone angles satisfying the discrete Gauss-Bonnet condition. Such a cone prescription can be generated by TODO. The output is a refined mesh with a parameterization and a file of metric coordinate values.
44+
The input mesh must be a manifold surface with a single connected component. The cone file must be a list of newline separated target vertex cone angles satisfying the discrete Gauss-Bonnet condition. Methods to generate such a cone prescription will be provided soon. The output is a refined mesh with a parameterization and a file of metric coordinate values.
4545

46-
We also provide the executable `bin/optimize_shear` for generating parameterizations using explicit shear coordinate optimization (see paper for details). The executable arguments and output are the same, but the allowed directions are different.
46+
We also provide the executable `bin/optimize_shear` for generating parameterizations using explicit shear coordinate optimization (see paper for details). The executable arguments and output are the same, but the allowed directions are different. This method is in practice much slower to converge than the metric optimization method, but it does have standard formal convergence guarantees.
4747

4848
## Figure Reproduction
4949

5050
Scripts to generate the figures of "Metric Optimization in Penner Coordinates" are included in `figures`.
5151

5252
![Some example figures](media/examples.jpg)
5353

54-
TODO
55-
The models (with parameterizations) and cameras used in [Algebraic Smooth Occluding Contours](http://ryanjcapouellez.com/papers/algebraic_smooth_occluding_contours.html) necessary for these scripts can be downloaded [here](http://ryanjcapouellez.com/papers/algebraic-contours-data.zip); they must be copied to `data/meshes` and `data/cameras` respectively.
54+
The models (with cone angles) and cameras used in [Metric Optimization in Penner Coordinates](https://dl.acm.org/doi/10.1145/3618394) necessary for these scripts can be downloaded [here](https://cims.nyu.edu/gcl/papers/2021-Conformal.zip); `MPZ_closed`, `MPZ_open`, `MPZ_cut`, and `cameras` must be copied to `data/closed-Myles`, `data/open-Myles`, `data/cut-Myles`, and `data/cameras` respectively.
5655

5756
A Conda environment must be activated (before compiling the code) with
5857
```
@@ -64,23 +63,23 @@ The figure bash scripts can then be run independently or in batch with
6463
bash fig-all.sh
6564
```
6665

67-
Note that most bash scripts generate an output directory with a JSON file specifying parameters for the parameterization and rendering pipeline python script `scripts/pipeline.py`. Such JSON files can also be used for general batch parameterization and analysis.
66+
Note that most bash scripts generate an output directory with a JSON file specifying parameters for the parameterization and rendering pipeline python script `scripts/_pipeline.py`. Such JSON files can also be used for general batch parameterization and analysis.
6867

6968
### Library
7069

7170
Many parametrization and mapping-related problems in geometry processing can be viewed as metric optimization problems, i.e., computing a metric minimizing a functional and satisfying a set of constraints, such as flatness.
7271

7372
Penner coordinates are global coordinates on the space of metrics on meshes with a fixed vertex set and topology, but varying connectivity, making it homeomorphic to the Euclidean space of dimension equal to the number of edges in the mesh, without any additional constraints imposed.
7473

75-
Crucially for practical applications, a new mesh with standard Euclidean edge lengths corresponding to a metric determined by arbitrary Penner coordinates can be computed by an efficient algorithm. Moreover, the new mesh only differs from the original by a finite sequence of edge flips. Since the resulting edge lengths are analytic functions of the Penner coordinates, standard first-order optimization methods can be applied.
74+
Crucially for practical applications, there is an efficient algorithm to convert these abstract Penner coordinates to a more familiar representation of a metric: a mesh with standard Euclidean logarithmic edge lengths. Moreover, this mesh only differs from the input mesh by a finite sequence of edge flips, and the resulting edge lengths are analytic functions of the Penner coordinates. We can thus formulate many constraints, such as vertex cone angles, on the mesh with Euclidean edge lengths as differentiable functions of Penner coordinates.
7675

7776
To engender future work in this exciting direction, we provide a library `PennerOptimizationLib` containing:
7877

7978
1. A representation of a mesh with Penner coordinates and cone angle constraints that supports:
80-
1. the computation of the corresponding mesh with Euclidean log edge lengths and the Jacobian of the log edge lengths with respect to Penner coordinates
79+
1. the computation of the corresponding mesh with Euclidean logarithmic edge lengths and the Jacobian of the logarithmic edge lengths with respect to Penner coordinates
8180
2. conformal projection to the cone angle constraints
8281
2. Various energy functionals and constrained optimization methods for meshes with Penner coordinates
83-
3. Layout and refinement methods to generate a parameterization for a mesh with arbitrary Penner coordinates such that the parameterization has the intrinsic metric prescribed by the coordinates.
82+
3. Layout and refinement methods to generate a parameterization for a mesh from arbitrary Penner coordinates, i.e., the parameterization is an embedding in the uv plane of the metric defined by the Penner coordinate.
8483

8584
## Citation
8685

src/app/optimize_metric.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
/*********************************************************************************
2+
* This file is part of reference implementation of SIGGRAPH Asia 2023 Paper *
3+
* `Metric Optimization in Penner Coordinates` *
4+
* v1.0 *
5+
* *
6+
* The MIT License *
7+
* *
8+
* Permission is hereby granted, free of charge, to any person obtaining a *
9+
* copy of this software and associated documentation files (the "Software"), *
10+
* to deal in the Software without restriction, including without limitation *
11+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
12+
* and/or sell copies of the Software, and to permit persons to whom the *
13+
* Software is furnished to do so, subject to the following conditions: *
14+
* *
15+
* The above copyright notice and this permission notice shall be included in *
16+
* all copies or substantial portions of the Software. *
17+
* *
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE *
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *
23+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS *
24+
* IN THE SOFTWARE. *
25+
* *
26+
* Author(s): *
27+
* Ryan Capouellez, Denis Zorin, *
28+
* Courant Institute of Mathematical Sciences, New York University, USA *
29+
* * *
30+
*********************************************************************************/
131
#include <igl/readOBJ.h>
232
#include <igl/writeOBJ.h>
333
#include "common.hh"

src/app/optimize_shear.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
/*********************************************************************************
2+
* This file is part of reference implementation of SIGGRAPH Asia 2023 Paper *
3+
* `Metric Optimization in Penner Coordinates` *
4+
* v1.0 *
5+
* *
6+
* The MIT License *
7+
* *
8+
* Permission is hereby granted, free of charge, to any person obtaining a *
9+
* copy of this software and associated documentation files (the "Software"), *
10+
* to deal in the Software without restriction, including without limitation *
11+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
12+
* and/or sell copies of the Software, and to permit persons to whom the *
13+
* Software is furnished to do so, subject to the following conditions: *
14+
* *
15+
* The above copyright notice and this permission notice shall be included in *
16+
* all copies or substantial portions of the Software. *
17+
* *
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE *
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *
23+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS *
24+
* IN THE SOFTWARE. *
25+
* *
26+
* Author(s): *
27+
* Ryan Capouellez, Denis Zorin, *
28+
* Courant Institute of Mathematical Sciences, New York University, USA *
29+
* * *
30+
*********************************************************************************/
131
#include <igl/readOBJ.h>
232
#include <igl/writeOBJ.h>
333
#include "common.hh"

src/app/plot_shear_energy.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
/*********************************************************************************
2+
* This file is part of reference implementation of SIGGRAPH Asia 2023 Paper *
3+
* `Metric Optimization in Penner Coordinates` *
4+
* v1.0 *
5+
* *
6+
* The MIT License *
7+
* *
8+
* Permission is hereby granted, free of charge, to any person obtaining a *
9+
* copy of this software and associated documentation files (the "Software"), *
10+
* to deal in the Software without restriction, including without limitation *
11+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
12+
* and/or sell copies of the Software, and to permit persons to whom the *
13+
* Software is furnished to do so, subject to the following conditions: *
14+
* *
15+
* The above copyright notice and this permission notice shall be included in *
16+
* all copies or substantial portions of the Software. *
17+
* *
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE *
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *
23+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS *
24+
* IN THE SOFTWARE. *
25+
* *
26+
* Author(s): *
27+
* Ryan Capouellez, Denis Zorin, *
28+
* Courant Institute of Mathematical Sciences, New York University, USA *
29+
* * *
30+
*********************************************************************************/
131
#include "common.hh"
232
#include "explicit_optimization.hh"
333
#include "energies.hh"

src/core/area.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
/*********************************************************************************
2+
* This file is part of reference implementation of SIGGRAPH Asia 2023 Paper *
3+
* `Metric Optimization in Penner Coordinates` *
4+
* v1.0 *
5+
* *
6+
* The MIT License *
7+
* *
8+
* Permission is hereby granted, free of charge, to any person obtaining a *
9+
* copy of this software and associated documentation files (the "Software"), *
10+
* to deal in the Software without restriction, including without limitation *
11+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
12+
* and/or sell copies of the Software, and to permit persons to whom the *
13+
* Software is furnished to do so, subject to the following conditions: *
14+
* *
15+
* The above copyright notice and this permission notice shall be included in *
16+
* all copies or substantial portions of the Software. *
17+
* *
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE *
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *
23+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS *
24+
* IN THE SOFTWARE. *
25+
* *
26+
* Author(s): *
27+
* Ryan Capouellez, Denis Zorin, *
28+
* Courant Institute of Mathematical Sciences, New York University, USA *
29+
* * *
30+
*********************************************************************************/
131
#include "area.hh"
232

333
#include "embedding.hh"

src/core/area.hh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
/*********************************************************************************
2+
* This file is part of reference implementation of SIGGRAPH Asia 2023 Paper *
3+
* `Metric Optimization in Penner Coordinates` *
4+
* v1.0 *
5+
* *
6+
* The MIT License *
7+
* *
8+
* Permission is hereby granted, free of charge, to any person obtaining a *
9+
* copy of this software and associated documentation files (the "Software"), *
10+
* to deal in the Software without restriction, including without limitation *
11+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
12+
* and/or sell copies of the Software, and to permit persons to whom the *
13+
* Software is furnished to do so, subject to the following conditions: *
14+
* *
15+
* The above copyright notice and this permission notice shall be included in *
16+
* all copies or substantial portions of the Software. *
17+
* *
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE *
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *
23+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS *
24+
* IN THE SOFTWARE. *
25+
* *
26+
* Author(s): *
27+
* Ryan Capouellez, Denis Zorin, *
28+
* Courant Institute of Mathematical Sciences, New York University, USA *
29+
* * *
30+
*********************************************************************************/
131
#pragma once
232

333
#include "common.hh"

0 commit comments

Comments
 (0)