After getting ndimensional cross product to work, this is what I've got.