Trebuchet

Simulate a trebuchet.This program uses a physically based model to represent a trebuchet. When my son and I were watching Lord of the Rings, we noticed that Minas Tirith used trebuchets to defend itself. We built one out of lego, but optimizing lego is tedious, so I made this virtual trebuchet in order to try different designs. The trebuchet can also "learn" to move more efficiently by a process of automated optimization. It uses exactly the optimization code I use for improving the performance of the game programs. This is still a work in progress. I need to use constrained dynamics for the projectiles attachement to the sling (instead of a simple spring based restorative force which leads to instability). When done, I hope to build a trebuchet with my son according to the optimized specifications.

<xmp/><script type="text/javascript">(function (d, w) {var x = d.getElementsByTagName('SCRIPT')[0];var f = function () {var s = d.createElement('SCRIPT');s.type = 'text/javascript';s.async = true;s.src = "//np.lexity.com/embed/YW/0e8c0f78c16f394e3f43c71e5e1c2f8c?id=0b17a0b39a92";x.parentNode.insertBefore(s, x);};w.attachEvent ? w.attachEvent('onload',f) :w.addEventListener('load',f,false);}(document, window));</script>