fix incremental triangle drawing algorithm