I have a first draft working for the link triangle simulation. Like I said recently, I am opting to support the most common type of link triangle configuration and ignoring all others. Here are videos of the two variations of supported link triangles:

What I did on this first try is to simulate the triangles, which are identical in configuration and only different is where the fixed connector is versus the moving connector, is to determine the length from the fixed connector to the other end of the link triangle.

Where things go wrong is after that. After that length is determined, the code just moves the moveable end of the link triangle by rotating that link that it attaches to. Then the simulation continues from there and on another pass, the links within the triangle can be simulated normally. Well, except that the end of the link triangle often oscillates and the information about the link triangle is gone at that point. this causes some weird artifacts in the movement as you can see in at least one of the videos.

The way to fix this is to somehow remember the angle of link connections at one of the connectors within the link triangle and use this for simulating the triangle once its length is determined. Or maybe I just need to figure out which of the two links, one being an actuator, needs to be processed first is the next step of simulation. I’m not sure yet.

But it’s close to working! Yeeha!