Flaw in SketchyPhysics gear joints
-
The gear joints are supposed to make it easy to simulate gears in a complex model without having to model every tooth of every cog individually but they fail in this due to a flaw in their programming in SP 3.2
I think the best way to demonstrate what I am talking about is with a working model. The attached model has an epicyclic sun/planet gear system. The middle system has individual teeth modelled to demonstrate how the physical system should work, The systems either side use gear joints to try and emulate what the middle "real" system does.
Controls for the simulation:
"R" key locks the red cylinder and Sun gear.
"B" key locks the blue cylinder that carries the planet gears.
"Spacebar" key releases both cylinders and allows all the cogs to free-wheel.Initially when the simulation is run the Sun wheel is locked and the green planet gears roll around the Sun wheel. The gear joint system on the right does a pretty good job of emulating this behaviour but the system on the left fails. When the blue planet gear carriers are locked, the gear joint system on the right fails to behave correctly.
Anyway, there is no way to set up the gear joints so that they work in a dynamic system. This is only a 3 cog system which is hardly complex and the third planet gear is not essential as it is only there for balance. The problem with the gear joints is that they only consider the motion of the objects they are grouped with and not the motion of the objects they are connected to. If the gear joints take both objects they are jointed with into consideration (as the motor joints do) they would behave correctly. Is anyone here able to make a ruby script that correct this problem with gear joints?
Secondly, would it be possible to make it so that that gear joints are more rigid than regular joints? This would stop the emulated gears getting out of sync so easily (due to flex in normal joints) and make the gear teeth appear to mesh correctly.
If these corrections/adjustments to the gear joints were done, it would be possible to make fairly good simulations of complex gear systems, such as vehicle differential drives, with little effort in SketchyPhysics.
-
hmm, i totally would have just used a bunch of motors and set the max speed somehow to a ratio... like, 1:2 gears, motors turn .5:1, controlled by same slider.
Advertisement