Closed iqch closed 3 years ago
// CRT
using namespace std;
// EIGEN
using Vec2 = Eigen::Vector2f; using Vec3 = Eigen::Vector3f;
// VIPER
int main() { viper::Scene scene;
scene.setUpDirection(Vec3(0, 1, 0)); viper::IntArray pIds, rIds; int numpt = 3; scene.addRod(3, Vec3(0, 0.75, 0), Vec3(1, 0, 0), 0.2, true, pIds, rIds); scene.state.xa[pIds[0]] = false; scene.state.xai[pIds[0]] = false; double T = 0; double dt = 0.1; cout << "T: " << T << " [ "; for (auto e : scene.state.x) cout << "(" << e[0] << "," << e[1] << "," << e[2] << "),"; cout << "]" << endl; for (int t = 0; t <5; t++) { scene.step(dt, 20, true); T += dt; cout << "T: " << T << " [ "; for (auto e : scene.state.x) cout << "(" << e[0] << "," << e[1] << "," << e[2] << "),"; cout << "]" << endl; }; return 0;
}
Plays fine. but stretching constraints did not work.
T: 0 [ (0,0.75,0),(1,0.75,0),(2,0.75,0),] T: 0.1 [ (0,0.75,0),(1,0.65001,0),(2,0.65001,0),] T: 0.2 [ (0,0.75,0),(1,0.45004,0),(2,0.45004,0),] T: 0.3 [ (0,0.75,0),(1,0.1501,0),(2,0.1501,0),] T: 0.4 [ (0,0.75,0),(1,-0.2498,0),(2,-0.2498,0),] T: 0.5 [ (0,0.75,0),(1,-0.74965,0),(2,-0.74965,0),]
X-coordinate does not change, it look like stretching has no limiting.
Even after ALMOST non-intrusive compiling and building - I've got this functionality https://youtu.be/rVMfXrkgTCg It looks like non-functioning constraints, which is core if this technology
// CRT
include
using namespace std;
// EIGEN
include <Eigen/Dense>
using Vec2 = Eigen::Vector2f; using Vec3 = Eigen::Vector3f;
// VIPER
include // Se issue #15
int main() { viper::Scene scene;
}
Plays fine. but stretching constraints did not work.
T: 0 [ (0,0.75,0),(1,0.75,0),(2,0.75,0),] T: 0.1 [ (0,0.75,0),(1,0.65001,0),(2,0.65001,0),] T: 0.2 [ (0,0.75,0),(1,0.45004,0),(2,0.45004,0),] T: 0.3 [ (0,0.75,0),(1,0.1501,0),(2,0.1501,0),] T: 0.4 [ (0,0.75,0),(1,-0.2498,0),(2,-0.2498,0),] T: 0.5 [ (0,0.75,0),(1,-0.74965,0),(2,-0.74965,0),]
X-coordinate does not change, it look like stretching has no limiting.