I would like to build a polygon with several holes in it, for example:
P = [ 0.5, 0.8; 1.0, 0.0; % outer boundary 0.0, 0.0; 0.5, 0.8; %{ %} 0.5, 0.3; 0.3, 0.1; % inner boundary I 0.7, 0.1; % (hole) 0.5, 0.3; %{ %} 0.5, 0.6; 0.3, 0.4; % inner boundary II 0.7, 0.4; % (hole) 0.5, 0.6; ]; figure, clf, hold on patch(P(:,1),P(:,2), 'r', 'linestyle', 'none')

However, patch does not work as I expected. When I change the last hole to this:
% ... 0.45, 0.6; % <- slightly offset in X-direction 0.3, 0.4; 0.7, 0.4; 0.45, 0.6; % <- slightly offset in X-direction % ...
it happens:

This method works well with a single hole, but can I apply the same technique to multiple holes? Or do I need to resort to splitting it, as shown here ?
NOTE In the end, I will build hundreds (possibly partially transparent) of polygons in 3D space, and I want to be able to "view" the holes. Therefore, solutions with a โwhite overlayโ polygon are not what I'm looking for.