Help on JavaScriptTreb Calculator

Parameters allowed

Entering reasonable values for input here will give correct results for the range and efficiency; don't try any zeros for any of the lengths or masses, for example. Also, you need to check for yourself that the CW will not hit the ground by insuring that the sum of the short arm and the CW arm is less than the height of the height of the pivot: l1+l4 less than l5. If you get an efficiency greater than about 0.8, your input parameters have likely violated this constraint. Other constraints that are tested for in TrebStar are not checked for in JSTreb—you need to do that yourself.

JSTreb does not include a sliding phase for the projectile, but assumes the projectile when the motion starts just falls into a trench. It is therefore only an approximation for TrebStar.

The maximum number of points allowed is 1600, and the time interval can be adjusted to encompass the relevant time interval. One or one-half of a second tottime works for trebs that are not too big. Be patient. Javascript is not real fast. The default parameters with 200 time intervals takes about 7 seconds on my 180 MHz PowerPC 8500

If you get weird results, an overflow, or underflow alert message, try increasing the number of points, npts. If that doesn't work, draw a sketch of the treb to scale and make sure all of the lengths make sense. If l5 is larger than l2, for example, this is not a "well-formed" treb. If that is ok, try changing the input parameters to a nearby set that works in order to see the characteristics of trebs in that region of the configuration space. The algorithm used does not include a variable step size feature, so it does not handle certain cases (where the sling "twirls") very well.

Browser dependencies

Versions of Netscape and Explorer lower than 3 don't work at all. Don't even try--Javascript was quite primitive back in the olden days. Other browsers may not work correctly now either. And, of course for the calculator to work the browser must have JavaSript installed and working!

Go back to home page.

Go Back to JavaScriptTreb claculator.