Calling the piecewiseAffine function such that it would draw no line crashes the program.
The issue only appears when all elements in the list are equal.
Calling piecewiseAffine white 1 [(0,0);(0,0);(0,0)] will crash, but piecewiseAffine white 1 [(0,0);(0,0);(0,1)] will not.