Skip to content

Multidimensional interpolation using simplicial complexes.

License

Notifications You must be signed in to change notification settings

camilleg/simplicial-interpolation

Repository files navigation

Simplicial Interpolation

screenshot

This software lets you specify a correspondence between points in two Euclidean spaces ℝd and ℝe, to then smoothly interpolate between them. For instance, this lets a mouse (d = 2) or a gamepad's pair of joysticks (d = 4) manipulate dozens or hundreds of parameters.

It implements simplicial interpolation, as described in Interpolated Mappings for Musical Instruments,
published in Organised Sound 7(2):85‒96, © Cambridge U. Press.

This software is licensed under the MIT License, © 2024 Camille Goudeseune,
except for code from Ken Clarkson's hull.shar, which is © 1995 AT&T and whose license is similar to the MIT License.

How to build and self-test

On Windows 10 or 11, install Windows Subsystem for Linux, using the Ubuntu 20 or Ubuntu 22 distro.

On Linux, Windows, or macOS 10.3+ (2003+), make test.

How to run the demo

On Linux or Windows, sudo apt install freeglut3-dev g++ libgl-dev libgl1-mesa-dev make.
On Mac, brew install freeglut.

  • On Windows, install and run an X server such as GWSL or VcXsrv.
  • make demo, or, to specify the high dimension e (say, 20) and the number of points (say, 100), ./glut 20 100
  • Move the mouse around over the window. If you like, zoom with the scroll wheel.
  • To exit, hit q or the escape key.

The mouse pointer q ("query") is interpreted as a weighted sum of the corners of its surrounding triangle. The size of each point's gray disc shows its weight. The special center point C is used for an unbounded simplex (a triangle with one edge at infinity), when q lies outside the points' convex hull.

History

This was published in 2002 at http://zx81.isl.uiuc.edu/interpolation/ (defunct), revised slightly in 2009, and moved to GitHub in 2018.