Discrete geometry for computer imagery