- Code: Select all
> (load "nbody0.lisp")
> (in-package :nbody0)
> (nbody0 "input-file" "output-file")
From the input file is read num-particles, eta, time-step, final-time, and epsilon-squared. Afterwards num-particles particles are read as: "mass x y z vx vy vz". Output is written to output-file as "mass x y z". See http://bima.astro.umd.edu/nemo/man_html/nbody0.1.html for details.
I've done some test runs & compared output w/ C version, and it seems to be working in SBCL. I've tested in CLISP also, but it errors out. In other Lisp environments, YMMV. I'm looking into other integration algorithms as well, & I'd like to get together a simple visualization package to animate the results. Comments/patches welcome from any interested parties.