I expanded the concept of the minecart shotgun into a perimeter defence system:
http://www.bay12forums.com/smf/index.php?topic=15096.msg6618589#msg6618589Several passages at the border of the surface area used by the fort are rigged with pressure plates, and triggering a plate releases a shot of ~150 trap components, going very fast. The system keeps three carts (each serves nine or ten of the 28 "gun barrels") in circulation and will path them towards the barrel that is to release the shot. Carts return to the loading station automatically, ammo must be collected and brought back to fort by haulers.
So far, it has killed one wombat and two yaks (wandering wild animals) and one tame cougar (friendly fire). Unfortunately, the hostile civs haven't sent troops for years. Reloading one cart takes several weeks.
Even if you don't bother looking up the linked post, the test shot may be worth watching:
http://mkv25.net/dfma/movie-2744-perimeterguntestshotIf something is in the way of the shot, it gets very thoroughly splattered. The strength of the shotgun is that it has no minimum range - it can blow apart something standing right next to the barrel - and an effective range at ramp-max speed of ~70 tiles, in a narrow cone. The main weakness i see with my design is the slow reaction: shot triggering depends on the raising of a bridge and carts are on a large cycle, requiring up to 160 steps of waiting until the cart cycles around again. In the 150-300 steps reaction time of the gun, wandering animals will often be outside of the shot cone again. A faster design with compact acceleration coil and door-triggered shot release should allow reaction times of about 50 steps.
Ballistic shots, especially at significant shot speeds, have minimum ranges of 50-150 tiles. If your minimum range (free-flight distance covered before getting back down to the floor) is 100+ tiles and your target zone is anywhere near the main fort, you'll have to set up the gun somewhere on the fringes of the embark. Have fun maintaining and reloading such a gun. I think that's a serious practical issue with a ballistic gun. Travel times (ammo can spend 70+ steps in flight) will also play a role.