compute triangle points