because scene.my.apples = numberOfOranges is bad practice.
Notes in the scene (or in user manuals), explaining things that just aren't right and can be fixed, don't correct the error and are just an admission of guilt.
Yes. I noticed that. Thanks for the feedback. I'm not sure how or where to set the limits of operation without severely limiting the range of motion.
Another way to fix this would be to change the equations of motion to be explicit as opposed to being implicit and iterative. Feel free to post a response with improved equations.
I took the easy way out and reduced the range of motion. I think that the cause of failure outside the range is due to the iterations diverging at indeterminate points (singularities) of motion. One point is when the four links that can change angle are all parallel to each other. Another point is when the horizontal spring becomes vertical.
Nice work. Elegant mechanical design and coding. The only thing I saw that I thought might be improved is the font. To me it looks crude and blurry. Set the font resolution to 50 px if you choose to sharpen it.
It took me a while to get this far. I am going to give it a rest for a while before I attempt to improve operation.
Xray,
Each gear works OK when the circles start out in the zero position. If they start out in a random position it may screw up. I thought it was only 5th gear, but I guess there's more.
Anybody may improve this scene and describe the improvement below or submit it as a scene response.
Yes, something like that. Looks like it needs a synchromesh system that allows changing gears when the input and output circles are in phase or near zero.
You write the rules the and then I'll tell you if it is a good idea or not. We don't need the device in this scene for a tug of war, we just need a chain.
Bend is a torsion spring.
bendConstant is the torsional spring constant (N/radian).
bendTarget is the spring zero deflection position with respect to the two connected geometry angles (radian).
The maximum torsion spring torque is limited by the motorTorque setting.
There is an analogy with a linear spring (torsional - linear):
Bend - Spring
bendConstant - spring constant
bend Target - target length