I have a polygon:
pgn = Polygon[{{0, 0}, {0, 0.018}, {0.155, 0.018}, {0.155 + 0.015,
0.008}, {0.222, 0.008}, {0.222, 0}, {0, 0}}];
here:
RegionPlot[pgn]
and a line intersecting this polygon:
line = {{0.1440048`, 0.00283}, {0.14415, 0.0031}, {0.14431,
0.0034}, {0.144, 0.0037}, {0.1446, 0.004}, {0.1449176`,
0.00445315`}, {0.1452178`, 0.00480635`}, {0.1455,
0.0051487`}, {0.14588, 0.005`}, {0.1462372`, 0.0058292`}, {0.1466,
0.0061}, {0.14703, 0.0065092`}, {0.1475198`,
0.00691035`}, {0.1481, 0.0074}, {0.1487492`, 0.0079}};
I create a region that is cut by this line from the polygon as follows:
f = Interpolation[line, InterpolationOrder -> 1];
ir = ImplicitRegion[y > f[x], {x, y}];
ri = RegionIntersection[pgn, ir]
Here it is:
DiscretizeRegion[ri]
My question: Is there other ways to create a geometric region our of such a composite object, except using the DiscretizeRegion
function?
The problem is that this function cannot be styled. It is always blue, which is a problem, if it is necessary to visualize a complex image, consisting of many sub-regions, differently treated.
DiscretizeRegion
? You create the region viaRegionIntersection
, and you can view it withRegionPlot
likeShow[ RegionPlot[{pgn, ri}], ListLinePlot@line]
$\endgroup$Show[ RegionPlot[{pgn, ri}], ListLinePlot@line]
does not work for me. I need not only to visualize, but I work with the region in question. It is not shown in my question. In the end I visualize the result together with the region in which it is obtained, another result together with its region and so on. It is, of course, possible, to work with the region, and then to visualize usingShow
, but it is more comfortable to work and visualize within the same paradigm. I hoped that I missed some useful function. $\endgroup$ri
? Could you kindly give a hint? $\endgroup$