# Tag Info

4

I first thought this was a bug, but then I recalled the fact that grid dividers can be specified by part. This worked in this case too. RegionPlot[{Disk[], Disk[{1, 0}]}, BoundaryStyle -> { 1 -> Directive[Orange, Thick], 2 -> Directive[Black, Thick]}]

3

I suspect that the cells closest to the $z$ axis in your region did not get optimized because their volume was simply too small to trigger the mesh refinement function: the solid is so thin in the vicinity of the $z$ axis, and its thickness is changing so rapidly, that any constant volume requirement small enough not to trigger the generation of thousands of ...

3

NOT A ANSWER Once corrected, your code gives the following with Mathematica 10.3.1 (on the "Wolfram Development PlatForm") It looks like a little bit better than what you obtain. EDIT I can't investigate further : my code crashes on the "Wolfram Development Platform"

3

The bug appears to be fixed in the latest version of Mathematica (10.3.1), as confirmed by @JasonB and @Szabolcs.

0

This problem can be solved by combining delayed evaluation, ParallelTable and ArrayPlot: f[p_?NumericQ, q_?NumericQ] := Resolve@Exists[x, p < x < q]; table = ParallelTable[f[p,q],{p,0,1,0.1},{q,0,1,0.1}]; ArrayPlot[table /. {True -> 1, False -> 0}, DataReversed -> True] This exploits the fact that a resolve in inequalities with just one ...

3

Just for the record, this is a way to do it in V9: << ComputationalGeometry` SeedRandom[42]; l = RandomReal[{0, 50}, {100, 2}]; {xr, yr} = Through[{Min, Max}[#]] & /@ Transpose@l; mylines = Line/@(Thread[{xr + {-1,1}, #}]&/@ Range[Sequence @@ yr, -Subtract @@ yr/10]); gc = GraphicsComplex[l, {FaceForm[White], EdgeForm[Black], ...

3

I would not claim that the following is smarter, but it is different in most respects. It gathers contiguous triangles with parallel normal vectors, extracts the vertices and eliminates duplicates, constructs polygons from those vertices, and plots the polygons to form the desired object. poly = MeshPrimitives[ConvexHullMesh[point], 2]; cros[x_] := ...

2

Here are solutions to both boundary protocols. They are built on the same basic framework -- mainly the function that generates the moves for the walker is what differs between the two. There is a little adjustment in the way the lines and walker point is drawn because of discontinuities in the path generated by the wrap-arround protocol, Path clips at the ...

12

r = N @ ImplicitRegion[ Sin[x Pi] > 0 || Sin[y Pi] > 0, {{x, 0, 9}, {y, 0, 9}} ] RegionPlot @ r r3 = N @ ImplicitRegion[ Sin[x Pi] > 0 || Sin[y Pi] > 0 || Sin[z Pi] > 0, {{x, 0, 9}, {y, 0, 9}, {z, 0, 9}} ] RegionPlot3D[r3, PlotStyle -> Opacity@.5] So you can play with translation and scaling with: Sin[2 x Pi] > 0 ...

6

You could use Region functionality (for simpler regions), e.g. rw[pt_, s_, n_, reg_] := Module[{ch = {{0, 0}, {1, 0}, {-1, 0}, {0, 1}, {0, -1}}, np, st}, st = RandomChoice[ch, n]; FoldList[If[RegionMember[reg, #1 + s #2], #1 + s #2, #1] &, pt, st] ] an[p_, step_, num_, regn_] := With[{pnts = rw[p, step, num, regn]}, ListAnimate[ ...

9

Here is an idea based on graphics primitives instead of mathematical inequalities. columnWidth = 1; regionSize = 10; holes = Table[ Rectangle[{x, y}, {x + columnWidth, y + columnWidth}], {x, columnWidth, regionSize, 2 columnWidth}, {y, columnWidth, regionSize, 2 columnWidth} ]; holes // Graphics Now we subtract these squares from a larger ...

3

This definitely seems like a bug in RegionIntersection, and you can confirm it using this simple example. Take two Region objects, one an ImplicitRegion defined along a horizontal line, the other a unit square. This error shows up regardless of whether RegionBoundary is used to define the region, so we'll leave it out. region1 = Rectangle[]; line1 = ...

5

Use ParametricRegion instead of Plot/ParametricPlot to obtain an exact region. Alternatively use DiscretizeGraphics on the output of Plot/ParametricPlot to approximate it as a region.

Top 50 recent answers are included