removed coordinate copy, fixed triangle object leak, returning vector by auto_ptr