user
Given the coordinates of a rectangle and a number, cut the rectangle into that
number of random, non-similar triangles that exactly cover the rectangle without
gaps or overlaps.

The number of triangles may have reasonable limits such as being above a small
limit, and/or odd or even, and/or prime for example.  
The number should not have an upper bound however, so that many triangles can be generated.

* Explain, or refer to the algorithm employed.
* Give a sample of sets of triangles produced from running the algorithm, on this page.
assistant
The first triangle bisects the rectangle via the diagonal. The rest of them all got one vertex at the origin and a side defined by ratios of numbers from a descending positive integer sequence.

```
# 20220123 Raku programming solution 

# Proof :
#
#    H-----------A---------B-------C-----D---E
#    |                                       |
#    |                                       |
#    |                                       |
#    O---------------------------------------L
#
#    ▲OEL is unique as its area is the sum of the rest.
#
#    and also in terms of area ▲OHA > ▲OAB > ... > ▲ODE
 

sub UnequalDivider (\L,\H,\N where N > 2) { 

   my \sum = $ = 0 ; my \part = $ = 0 ; my @sequence = (N^...1) ; 

   loop {                                               #   if  ▲OHA ~ ▲OEL    
      sum  = @sequence.sum;                             #   increase 1st term 
      @sequence[0]*L*L/sum == H*H ?? (@sequence[0] +=1) !! last 
   }

   (  [ (0,0), (L,H), (L,0) ],  ).Array.append: @sequence.map: -> \chunk {
      [ (0,0), (L*part/sum,H), (L*(part+=chunk)/sum,H) ] ;
   } 
}

.say for UnequalDivider(1000,500,5);

```

Output:

```
[(0 0) (1000 500) (1000 0)]
[(0 0) (0 500) (400 500)]
[(0 0) (400 500) (700 500)]
[(0 0) (700 500) (900 500)]
[(0 0) (900 500) (1000 500)]

```