compute_npcx function

Compute NPC coordinates