arc implementation with three points