Stores the coordinates of the vertices of the triangles
int n = rectangle . Count ; List < List < int > > triangle1 = new List < List < int > > ( ) ; for ( int i = 1 ; i < n ; i ++ ) triangle1 . Add ( rectangle [ i ] ) ; List < List < int > > triangle2 = new List < List < int > > ( ) ; for ( int i = 0 ; i < 3 ; i ++ ) { triangle2 . Add ( rectangle [ i ] ) ; } List < List < int > > triangle3 = new List < List < int > > ( ) ; for ( int i = 0 ; i < 2 ; i ++ ) { triangle3 . Add ( rectangle [ i ] ) ; } triangle3 . Add ( rectangle [ 3 ] ) ; List < List < int > > triangle4 = new List < List < int > > ( ) ; for ( int i = n - 2 ; i < n ; i ++ ) { triangle4 . Add ( rectangle [ i ] ) ; } triangle4 . Add ( rectangle [ 0 ] ) ;