# Tag Info

0

This is very similar to this question. In that case you are looking at the 1-dimensional overlap between 2-dimensional regions and taking its measure. Here you are looking at the intersection between a 1D and a 2D region and taking its measure. Both of these cases can be considered "near singular", to borrow a phrase from one of the developers, and it is ...

4

Okay, so you have a set of Regions that you want to fill, but you can only define those regions by a set of points distributed within them. Let's make some data that reproduces this. Here are three non-overlapping regions that fill up a square: region1 = Disk[{0, 0}, 1, {0, π/2}]; region2 = RegionDifference[Rectangle[], region1]; region3 = Disk[{0, 0}, 1, ...

0

Example Code ListPlot[Range @ 100, Filling -> Bottom] ListLinePlot[Range @ 100, Filling -> Bottom] Output Reference Filling ListPlot ListLinePlot

5

Another workaround is to turn the polygons into MeshRegions first, RegionIntersection @@ (DiscretizeGraphics /@ {p1, p2}) // MeshPrimitives[#, 2] & // First (* Polygon[{{0.407273, 0.650444}, {0.509656, -0.0200315}, {0.998507, 0.0546171}, {0.640904, 0.767621}}] *) Where p1 and p2 are your polygons Edit - more odd behavior What's even odder ...

10

This is a bug that has been fixed in the development version. For a possible workaround, use exact coordinates, for example sp = Function[p, SetPrecision[p, Infinity]]; ri = RegionIntersection[ sp@Polygon[{{0.5096555454081809, -0.02003146973392257}, {0.9985073695269602, 0.05461714932464575}, {0.6966031018052412`, 2....

3

Here is an approach that generates many more points than you had, selects the ones for which your conditions are met, and plots them: k1[s_, d_] := 3 s + 5 d k2[s_, d_] := 5 s - 7 d ps = RandomVariate[UniformDistribution[{{0.1, 2}, {-1, 3}}], 1000000]; valid = Select[ps, 0 < k1[Sequence @@ #] <= 1 && 0 < k2[Sequence @@ #] <= 2 &]; ...

3

Your approach is a dead end, you can't determine all points by picking them and checking conditions. Because there are infinitely many of them. ImplicitRegion[ 0 < k1[x, y] <= 1 && 0 < k2[x, y] <= 2, {x, y} ] // RegionPlot

3

The documentation for RegionPlot3D states You should realize that since it uses only a finite number of sample points, it is possible for RegionPlot3D to miss regions in which pred is True. To check your results, you should try increasing the settings for PlotPoints and MaxRecursion. This is what happened in your second example, a result of the region ...

5

A possible workaround (brought up by the Wizard in the comments) involves the use of some of the functions from this previous answer. In particular, you will need orthogonalDirections[], extend[], and crossSection[] from that answer, along with these two additional functions for generating a suitable MeshRegion[] object: MakeTriangleMesh[vl_List, opts___] :=...

0

Example RegionQ @ Cylinder[] True RegionPlot3D @ Cylinder[] Output RegionQ @ Tube[{{0, 0, 0}, {1, 1, 1}}] False RegionPlot3D @ Tube[{{0, 0, 0}, {1, 1, 1}}] Output {Tube[{{0,0,0},{1,1,1}}]} is not a valid region to plot. EDIT In order to achieve region look-a-like Tube, see implementation below. Example region = Fold[...

6

It is confirmed as an improper behavior of RegionDifference by Wolfram support([CASE:3624735]). Here is their workaround: Instead of using boundary representation of geometric regions as given below, try using just the geometric regions in geometric computations. To be specific, here is the solution to this problem. Assuming wordRegion and disks ...

0

Description This solution does not fully cover the requirements of the original post, but it does achieve the desired output. In order to visualize how arbitrary gas cloud fills up the available volume, I have combined two Cuboid regions using RegionUnion. This new region has then been tested for intersection with a Ball of varying radii using ...

5

The rectangle (0,0), (0.5,0), (0,1),(0.5,1) should be covered, however it is not. The 29 rectangles in your original tabla cover the region 1/31 <=b < 1/2 && 0 <= a <= 1. ClearAll[tabla] tabla[n_] := Table[{1/(k + 1) <= b && 1/k > b}, {k, 2, n, 1}]; You can specify a large enough value for PlotPoints to see all 29 ...

11

region = ImplicitRegion[ 0 < z < 4 - x*y && 0 <= x <= 2 && 0 <= y <= 1, {x, y, z}]; RegionPlot3D[region, BoxRatios -> {1, 1, 1}, Axes -> True] Volume[region] (* 7 *) RegionMeasure[region] (* 7 *) Integrate[1, {x, 0, 2}, {y, 0, 1}, {z, 0, 4 - x*y}] (* 7 *) Integrate[1, Element[{x, y, z}, region]]...

Top 50 recent answers are included