Git Product home page Git Product logo

arff's Introduction

Algebraic Representations for Volumetric Frame Fields

Introduction

This code includes algorithms for computing volumetric (octahedral and odeco) frame fields, described in detail in our preprint:

Palmer, D., Bommes, D., & Solomon, J. (2019). Algebraic Representations for Volumetric Frame Fields. arXiv preprint arXiv:1908.05411.

External Dependencies

Installation

First, remember to build and install the Mosek Fusion API as described here.

The following commands will compile all MEX files and add the code to the MATLAB path.

cd src/batchop
mexbuild /path/to/tbb/include
cd ../sdp
mexbuild /path/to/tbb/include /path/to/mosek/9.0
cd ../..
install

Usage

The main commands for computing fields are MBO, OctaManopt, and OdecoManopt.

Loading Models

Some tetrahedral meshes in Medit format are included in the meshes directory for convenience. To load a mesh, use

mesh = ImportMesh('meshes/rockerarm_91k.mesh'); % Medit format

We also support meshes in Tetgen format:

mesh = ImportMesh('path/to/file.node'); % Tetgen .node/.ele format

Computing Frame Fields

The following commands compute octahedral and odeco fields by MBO with random initialization:

qOcta = MBO(mesh, OctaMBO, [], 1, 0);
qOdeco = MBO(mesh, OdecoMBO, [], 1, 0);

For modified MBO as described in our paper, set the diffusion time multiplier and exponent as follows:

qOcta = MBO(mesh, OctaMBO, [], 50, 3);
qOdeco = MBO(mesh, OdecoMBO, [], 50, 3);

The following lines compute octahedral and odeco fields by RTR with specified initial fields. Drop the second argument for random initialization.

qOcta = OctaManopt(mesh, qOcta);
qOdeco = OdecoManopt(mesh, qOdeco);

Visualization

To visualize an octahedral or odeco field, use VisualizeResult, which plots the integral curves and singular structure, e.g.,

VisualizeResult(mesh, qOdeco);

PlotInterpolatedFrames plots field-oriented cubes at specified sample points:

PlotInterpolatedFrames(q, mesh.tetra, samples)

where samples is a $k \times 3$ matrix of sample positions.

Figures

We have included scripts for generating (MATLAB versions of) figures that appear in the paper in the figures/ directory.

  • EnergyTest compares energy divergence behavior of octahedral and odeco fields, as in Figure 8 in the paper.

  • PrismFigures generates a figure similar to Figure 1 in the paper, showing scaling behavior of an odeco field.

  • To verify the exactness of SDP projection into the octahedral and odeco varieties, respectively, execute

    OctaExactnessTest(n);
    OdecoExactnessTest(n);
    

    for a sufficiently large value of n.

The following three scripts display comparisons to previous work. These require a patched version of the code released with [Ray et al. 2016]. To avoid any possible copyright issues, we are not including this code in this public release. Please contact the authors if you need it.

  • ProjectionComparison generates figures like Figure 4 in the paper.

  • ConvergenceComparisons generates figures like Figures 5 and 6 in the paper:

    ConvergenceComparisons('../meshes', 'path/to/output/');
    
  • GenerateComparisons generates a table like that in our supplemental document:

    GenerateComparisons('../meshes', 'path/to/output/');
    

arff's People

Contributors

dpa1mer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.