Coder Social home page Coder Social logo

mit-gfx / locointerpolate Goto Github PK

View Code? Open in Web Editor NEW
5.0 16.0 4.0 1.68 MB

[SIGGRAPH 2017] Interactive Design Space Exploration and Optimization for CAD Models

Home Page: https://homes.cs.washington.edu/~adriana/instantCAD/index.html

CMake 0.93% C++ 98.99% C 0.08%
cad parametric-design interpolation simulation

locointerpolate's Introduction

LOCOInterpolate

Algorithm for LOcal COntinuous Interpolation developed by Schulz et al 2017. Please reference this this paper for description of the method.

Setup

Clone repository:

git clone https://github.com/mit-gfx/LOCOInterpolate

Download Eigen v3.3.5 from http://eigen.tuxfamily.org/ and place all Eigen files in this location:

LOCOInterpolate/libs/eigen/

Download CMake from https://cmake.org/

Build on Unix/OSX

Download Google protobuf v3.1.0: https://github.com/google/protobuf/blob/master/src/README.md

or

Download Google protobuf v3.1.0 from: https://github.com/google/protobuf/releases/v3.1.0

Build protobuf following the instructions here: https://github.com/google/protobuf/blob/master/src/README.md

Place the libprotobuf.a file in

LOCOInterpolate/libs/protobuf/lib

To build LOCOInterpolate, execute the following in the LOCOInterpolate directory:

$ mkdir build && cd build
$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
$ make
$ cd ../../bin
& ./Test #To verify that the code works.

Build on Windows using VisualStudio

Download and install Google protobuf v3.1.0 according to these directions https://github.com/google/protobuf/blob/master/cmake/README.md

NOTE - Build protobuf using a Win64 generator.

NOTE - Set the runtime library to Multi-threaded DLL /MD. In VisualStudio this can be done by Properties -> Configuration Properties -> C/C++ -> Code Generation -> Runtime Library -> Multi-threaded DLL /MD. Similarly, when building in debug mode, set the runtime library to Multi-threaded DLL debug /MDd.

Place the libprotobuf.lib and libprotobufd.lib files in

LOCOInterpolate/libs/protobuf/lib

To build LOCOInterpolate, execute the following in the LOCOInterpolate directory:

C:\> mkdir build
C:\> cd build
C:\> cmake -G "Visual Studio [VERSION] Win64" -DCMAKE_BUILD_TYPE=Release ..

Open LOCOInterpolate.sln and build the solution in x64 Release mode. Run Test.

Code Description

LCAdaptiveSampling Library

  1. OCAdaptiveGrid represents the k-d tree in the parameter space. The tree stores samples, which are the result of evaluating various points in the parameter space. These samples are used to interpolate and approximate any given point in the space. Our algorithm adaptively refines this tree until the interpolation approximates the evaluation function to a desired degree of accuracy.
  2. OCAdaptiveGridCell represents an element of the k-d tree
  3. OCBasisFunction represents the basis function that compose the support of a given sample. This class is subclassed by LCLinearBSpline and LCCubicBSpline. These subclasses implement linear and cubic supports respectively.
  4. OCSampledFunction inherits from OCFunction and can evaluate any point in its domain. Note that this is accomplished using interpolation and not direct evaluation of the function.
  5. OCSample represents the result of evaluating a particular coordinate in the parameter space.
  6. OCProtoConverter handles storage of samples and functions via Google's protobuf

LCFunction Library

This library contains the abstract class that defines a a function f: X-> Y, where:

  • X is the parameter space and is contained in R^N (N= number of parameters). More precisely, X is an N-dimensional rectangular prism with boundaries given by LCFunction.getRanges().

  • Y is the image space, and can represent a variety of abstract values (e.g. it can be a real number or a 3D mesh). This domain is not implemented in the base class, but will be defined by the subclasses which inherit from OCFunction.

The four base classes are:

  • LCFunction which represents a function f on the parameter space.
  • LCFunctionValue represents the result of evaluating f at a particular coordinate
  • LCFunctionDeriv represents the result of evaluating the derivative of f at a particular coordinate
  • LCFunctionValueMap specifies a homeomorphic mapping between two values in the image of f

We also provide a set of four classes that inherit from these base classes. Together, these classes define a function f : X -> R. Users who wish to define their own functions and image space should modify these files or follow their example:

  • LCRealFunction
  • LCRealFunctionValue
  • LCRealFunctionDerivValue
  • LCRealFunctionValueMap

Finally, the classes PrecomputedParametricShape.pb and LCShapeInfoProtoConverter handle data storage via Google's protobuf.

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.