Coder Social home page Coder Social logo

vastyellownew / sde Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hewenbin/sde

0.0 0.0 0.0 3.26 MB

OpenGL and WebGL based kernel density estimation library

Home Page: https://hewenbin.github.io/sde/

License: MIT License

HTML 2.51% Python 3.78% JavaScript 93.71%

sde's Introduction

Surface density estimate (SDE) [1] extends kernel density estimate (KDE) [2] from discrete data points to surfaces (i.e., polygon meshes) to model the positional uncertainty of surfaces.

The aim of this project is to provide OpenGL and WebGL based parallel implementations on computing SDE for a set of input surfaces.

A WebGL based live demo

Dependencies

The core functionalities (e.g., SDE computation) of this project are self-contained. For the visualization of the density estimation results in the examples, third-party visualization libraries (e.g., vtk and sharevol.js) are used. Note that sharevol.js used in the examples is slightly different from the original version to meet the requirements of this project.

Usage

WebGL and JavaScript

Download sde.js and include it in your HTML.

<script src="sde.js"></script>

The following code computes the SDE of a triangle with respect to given parameters (e.g., bandwidth matrix).

// input surfaces
var surfaces = [-8., -3.,  2.,   // first vertex
                 7., -9.,  4.,   // second vertex
                 1.,  8., -2.];  // ...

// parameters
var xmin = -10., ymin = -10., zmin = -10.,  // Physical domain that
    xmax =  10., ymax =  10., zmax =  10.;  // density estimation is
                                            // performed on.

var xdim = 64, ydim = 64, zdim = 64;  // Grid resolution of
                                      // the physical domain.

var H = [[.01, 0.,  0.],
         [0.,  .01, 0.],
         [0.,  0.,  .01]];  // bandwidth matrix

// surface density estimator
var estimator = new DensityEstimator(surfaces);

// SDE computation
var sde = estimator.Compute(xmin, ymin, zmin,
                            xmax, ymax, zmax,
                            xdim, ydim, zdim,
                            H);

If everything went well, you should get an array of densities for the positions of interest.

OpenGL and C/C++

Under development.

References

[1] Wenbin He, Hanqi Guo, Han-Wei Shen, and Tom Peterka, "eFESTA: Ensemble Feature Exploration with Surface Density Estimates", IEEE Transactions on Visualization and Computer Graphics.

[2] Kernel density estimation. https://en.wikipedia.org/wiki/Kernel_density_estimation.

sde's People

Contributors

hewenbin 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.