Divide a rectangle into a number of unequal triangles: Difference between revisions

(New draft task with Python solutions.)
 
(→‎{{header|Python}}: Coordinates.)
Line 14:
=={{header|Python}}==
I thought up two algorithms that are explained in the docstrings of functions `rect_into_tri`and `rect_into_top_tri`.
 
It is assumed that the rectangle has its bottom left coordinate at (0,0) and is not rotated in the coordinate space, meaning that the location of the top-right corner of the rectangle is then enough to define it.
 
<lang python>
Anonymous user