function pi3 = othervertex(m,ci,pi1,pi2)
    for i=1:3
        trypi = m.tricellvxs(ci,i);
        if (trypi ~= pi1) && (trypi ~= pi2)
            pi3 = trypi;
            break;
        end
    end
end
