Simple Region plot with "or" condition (||) does not connect the or parts "smoothly"?
It looks like the default discretization method gives the desired singular vertex:
reg = ImplicitRegion[x <= y && x < 2 || x >= y && x >= 2, {{x, 0, 5}, {y, 0, 5}}];
mesh = BoundaryDiscretizeRegion[reg, Frame -> True]
We can verify this by highlighting the vertices:
HighlightMesh[mesh, Style[0, Red]]
See Specific initial sample points for 3D plots for some discussion of following form of PlotPoints
. Basically throw a point into the offending area and increase MaxRecursion
(default value is 2
), if needed. If you follow the linked Q&A, you'll realize this approach has a good chance to succeed and a still significant chance that it will fail. It succeeds here if we raise MaxRecursion
to 3
:
RegionPlot[x <= y && x < 2 || x >= y && x >= 2, {x, 0, 5}, {y, 0, 5},
MaxRecursion -> 3, PlotPoints -> {Automatic, {{2.001, 2.01}}}]