triangulator.r = adding missing reset of some buffers and internal variables