Can you just run a linear regression on each set of 5 points, and then split the
difference by bisecting the angle between them with the plane?
You might try asking on StackOverflow or Mathematica forums - they have people
over there with WAY too much mathematical talent.