Skip to content

Instantly share code, notes, and snippets.

@grassjelly
Created May 25, 2019 13:33
Show Gist options
  • Save grassjelly/7ac9221febd197413f9ebb27883b01e1 to your computer and use it in GitHub Desktop.
Save grassjelly/7ac9221febd197413f9ebb27883b01e1 to your computer and use it in GitHub Desktop.
BLA::Matrix<4,4> denominator =
{
2, 1, -4, 0,
1, 0, 0, -1,
0, 1, 0, -3,
0, 0, 1, -1
};
BLA::Matrix<4,4> x_numerator =
{
4, 1, -4, 0,
0, 0, 0, -1,
2, 1, 0, -3,
0, 0, 1, -1
};
BLA::Matrix<4,4> y_numerator =
{
2, 4, -4, 0,
1, 0, 0, -1,
0, 2, 0, -3,
0, 0, 1, -1
};
BLA::Matrix<4,4> z_numerator =
{
2, 1, 4, 0,
1, 0, 0, -1,
0, 1, 2, -3,
0, 0, 0, -1
};
BLA::Matrix<4,4> t_numerator =
{
2, 1, -4, 4,
1, 0, 0, 0,
0, 1, 0, 2,
0, 0, 1, 0
};
leg_stance->p.X() = x_numerator.Det() / denominator.Det();
leg_stance->p.Y() = y_numerator.Det() / denominator.Det();
leg_stance->p.Z() = z_numerator.Det() / denominator.Det();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment