rewrite point cal

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>