Archive for September, 2005

Piston Assembly Simulation

September 27, 2005

I am not aware that it took me two weeks to finish the piston model. Now the piston model seems to work fine, and it is actually visually stunning. I can just stare satisfyingly at the running piston for a long period of time. My plan is to package and distribute it as a demo. My other thought is to painstakingly re-implement the whole thing in Matlab and then accustomize it with Baraff’s linear-time Lagrange constraint solver. Cross-checking the results in Java and Matlab should provide a solid foundation for this new methodology (well, 10 year old).
On second thought, I might just think it through and do it in Java and compare the results of the new method to those of the old method.

Implementing Piston Assembly Model

September 14, 2005

Very difficult running the C version of ODE and comparing it to my Java version. Instead of debugging the hinge joint, I continued to implement the slider joint. Then I moved all the test programs to the test package. Furthermore, I merged the rapid project with this TestHinge project. Now the TestHinge project includes Trimesh and I can actually continue to implement the piston project.

Finish Hinge Joint

September 12, 2005

I fixed some problems over the weekend. Now the simulation can proceed normally except when the random errors are introduced.

To-do list:

1. Fix the remaining problems.
2. Implement Baraff’s Linear-time Lagrange solver.
3. Extend this progress to the case of piston and crank with trimesh models.

Some handy translations:

dCROSSMAT(M,a,s,-,+);
-> M.assign(new double[][]{{0, a.z, -a.y},
                           {-a.z, 0, a.x},
                           {a.y, -a.x, 0}});

dMULTIPLY0_331(a,M,b);
-> M.transform(b,a);

dMULTIPLY1_331(a,M,b);
-> M1.transpose(M); M1.transform(b,a);

dQMultiply0(q1,q2,q3);
-> q1.mul(q2,q3);

dQMultiply1(q1,q2,q3);
-> q1.inverse(q2); q1.mul(q3);

dQMultiply2(q1,q2,q3);
-> q1.mulInverse(q2,q3);

dQMultiply3(q1,q2,q3);
-> q1.inverse(q2); q1.mulInverse(q3);

Implementing Hinge Joint

September 8, 2005

This is the effort to implement the hinge joint while taking a break from messing around the contact and collision detection.

LimitMotorJoint.java was translated today from joint.cpp. The caveat is the addLimot() function, where how the local Js are connected to the global J is not thought out yet. The problem is I don’t know how to use this function yet.