Skip to content

Instantly share code, notes, and snippets.

@erincatto
Last active April 26, 2016 17:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erincatto/5e01bb76b8e797cf8f95 to your computer and use it in GitHub Desktop.
Save erincatto/5e01bb76b8e797cf8f95 to your computer and use it in GitHub Desktop.
Featherstone
Given J*JT * x = b, solve for x in linear time and space.
J is m by n
x is m by 1
b is m by 1
m < n
J is a rectangular matrix that represents a tree with equal and opposite entries.
For example:
J = [1 -1 0 0]
[0 1 -1 0]
[0 1 0 -1]
This is a 4 node tree:
1 -- 2 -- 3
\-- 4
Note that J is sparse and can be stored in O(m) memory.
The columns of J represent the nodes (bodies).
The rows of J represent the edges (joints).
J is the transpose of the Incidence matrix (http://en.wikipedia.org/wiki/Incidence_matrix)
@RandyGaul
Copy link

"This is the essential linear algebra problem that Featherstone's algorithm solves in linear time and space" - erin from twitter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment