triangle library with initial demo