added 3d option
implement log potential in cbuiltin
fixed typos
added test for c log potential
also try rotated halo