I use an old newton dll. Similar code in the "newton game dynamics tutorials."
http://www.coniserver.net/down/setupngd.exe
"\Newton\newtonTutorials\pool\newton_physics.wdl"
"gravitation_gun" function.