Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/duxingyi-charles/Robust-Implicit-Surface-Networks
10 May 2026, 01:34:29 UTC
  • Code
  • Branches (2)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/main
    • refs/heads/qnzhou/corner_cases
    No releases to show
  • a3730c9
  • /
  • README.md
Raw File Download Save again
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge
swh:1:cnt:c49969ba568927fb66a6094e28c8e536e50a1a2f
origin badgedirectory badge
swh:1:dir:a3730c9d6b74c057a026e6809063ec75d9ea430d
origin badgerevision badge
swh:1:rev:fb6f7734d768329946ad26ab0798954c63b6bd33
origin badgesnapshot badge
swh:1:snp:f672d4d3fe9fc55c11aff87eeef9bbc0fb3c390f

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: fb6f7734d768329946ad26ab0798954c63b6bd33 authored by Qingnan Zhou on 20 November 2024, 19:25:11 UTC
Build cleanup (#17)
Tip revision: fb6f773
README.md
# Robust Computation of Implicit Surface Networks for Piecewise Linear Functions

![](https://user-images.githubusercontent.com/3606672/187550647-900c8e12-bd57-4270-97da-15a0180e0c39.png)

[Xingyi Du](https://duxingyi-charles.github.io/), [Qingnan Zhou](https://research.adobe.com/person/qingnan-zhou/),  [Nathan Carr](https://research.adobe.com/person/nathan-carr/), [Tao Ju](https://www.cse.wustl.edu/~taoju/)
<br/>*ACM Transaction on Graphics (Proceedings of SIGGRAPH 2022)*<br/>

[`Project Page`](https://duxingyi-charles.github.io/publication/robust-computation-of-implicit-surface-networks-for-piecewise-linear-functions/)

## Build

Use the following commands to build on Mac.

    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release ..
    make

Program `impl_arrangement` and `material_interface` will be generated in the `build` subdirectory.

## Usage

### `impl_arrangement`

The program creates a polygonal mesh discretization of the implicit arrangement of a collection of implicit functions on a given tetrahedron grid.

Usage: 

    ./impl_arrangement [OPTIONS] config_file

Options:
- -h,--help: Print help message and exit.
- -T,--timing-only: When set, the program only records timing without saving results.
- -R,--robust-test: When set, the program performs robustness test. The program will run twice with different ordering of input functions, and check if the results are consistent.

Positionals:
- `config_file` (REQUIRED): Configuration file, specifying input/output paths and algorithm parameters.

The `config_file` should be a JSON file with the following named parameters:
- `tetMeshFile`: Path to the file storing input tetrahedral grid. It is a JSON file storing vertex coordinates and tetrahedrons. See `examples/tet_mesh/tet5_grid_10k.json` for a concrete example.
- `funcFile`: Path to the file storing input implicit functions. See this [repo](https://github.com/duxingyi-charles/implicit_functions) for details about the file format.
- `outputDir`: Path to the directory to store output files.
- `useLookup`: Whether to use look-up tables to accelerate tetrahedron processing (section 6 of our paper). Default value is "true".
- `useSecondaryLookup`: Whether to use look-up tables for tetrahedral with two active functions (section 6 of our paper). Default value is "true".
- `useTopoRayShooting`: Whether to use topological ray shooting to compute the spatial decomposition induced by the arrangement (section 7 of our paper). Default value is "true".

Note that `tetMeshFile`, `funcFile` and `outputDir` can be either absolute
or relative paths.  In the case of relative paths, they are relative with
respect to the directory containing the configuration file.

An example config file is `examples/implicit_arrangement/config.json`.

Test:

compute implicit arrangement

    ./impl_arrangement ../examples/implicit_arrangement/config.json

record timing without saving results

    ./impl_arrangement -T ../examples/implicit_arrangement/config.json

perform robustness test

    ./impl_arrangement -R ../examples/implicit_arrangement/config.json

### `material_interface`

The program creates a polygonal mesh discretization of the material interfaces of a collection of material functions on a given tetrahedron grid.

Usage:

    ./material_interface [OPTIONS] config_file

Options:
- -h,--help: Print help message and exit.
- -T,--timing-only: When set, the program only records timing without saving results.
- -R,--robust-test: When set, the program performs robustness test. The program will run twice with different ordering of input functions, and check if the results are consistent.

Positionals:
- `config_file` (REQUIRED): Configuration file, specifying input/output paths and algorithm parameters.

The `config_file` should be a JSON file with the following named parameters:
- `tetMeshFile`: Path to the file storing input tetrahedral grid. It is a JSON file storing vertex coordinates and tetrahedrons. See `examples/tet_mesh/tet5_grid_10k.json` for a concrete example.
- `funcFile`: Path to the file storing input material functions. See this [repo](https://github.com/duxingyi-charles/implicit_functions) for details about the file format.
- `outputDir`: Path to the directory to store output files.
- `useLookup`: Whether to use look-up tables to accelerate tetrahedron processing (section 6 of our paper). Default value is "true".
- `useSecondaryLookup`: Whether to use look-up tables for tetrahedral with three active functions (section 6 of our paper). Default value is "true".
- `useTopoRayShooting`: Whether to use topological ray shooting to compute the spatial decomposition induced by the material interfaces (section 7 of our paper). Default value is "true".

Note that `tetMeshFile`, `funcFile` and `outputDir` can be either absolute
or relative paths.  In the case of relative paths, they are relative with
respect to the directory containing the configuration file.

An example config file is `examples/material_interface/config.json`.

Test:

compute material interface

    ./material_interface ../examples/material_interface/config.json

record timing without saving results

    ./material_interface -T ../examples/material_interface/config.json

perform robustness test

    ./material_interface -R ../examples/material_interface/config.json

## Output

The complete set of output files include data files (`mesh.json`, `mesh_patches.msh`, `mesh_chains.msh` and `mesh_cells.msh`)
and information files (`timings.json` and `stats.json`). In timing-only mode (`-T`), the program only generates information files.
In robustness test mode (`-R`), no output files are generated. The result of the robustness test is in command line output.

### data files

`mesh.json`:
JSON file storing the following key-value pairs

| key     | value                         | description                                                                                                                                                                                                                                              |
|---------|-------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| points  | #Vx3 matrix of double numbers | Vertex coordinates of the surface network mesh.                                                                                                                                                                                                          |
| faces   | vector of vector of integers  | Polygonal faces of the surface network mesh. Each face is encoded by a vector of indices of face boundary vertices.                                                                                                                                      |
| edges   | #Ex2 matrix of integers       | Edges of the surface network mesh. Each edge is encoded by a pair of vertex indices.                                                                                                                                                                     |
| chains  | vector of vector of integers  | Chains of non-manifold edges. Each chain is encoded by a vector of edge indices.                                                                                                                                                                         |
| corners | vector of integers            | Indices of non-manifold vertices.                                                                                                                                                                                                                        |
| patches | vector of vector of integers  | A patch is a connected component of faces bounded by non-manifold edges.  Each patch is encoded by a vector of face indices.                                                                                                                             |
| shells  | vector of vector of integers  | A shell is a connected component of the boundary of a 3D region partitioned by the surface network. Each shell is encoded by a vector of oriented patch indices. The positive side of patch i has index 2i. The negative side of patch i has index 2i+1. |
| cells   | vector of vector of integers  | A cell is a 3D region partitioned by the surface network. Each cell is encoded by a vector of shell indices.                                                                                                                                             |

Note: all indices start from 0.

`mesh_patches.msh`, `mesh_chains.msh` and `mesh_cells.msh` store the same data as chains, patches and cells in `mesh.json`, but in MSH format.
We can view these MSH files using [Gmsh](https://gmsh.info/).

### information files

`timing.json`: timing of different stages of our pipeline.

`stats.json`: statistics of intermediate data in our pipeline, e.g., number of surface network mesh vertices.

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API