Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Hot answers tagged

11

In addtion to Carl's answer, you can also force to rasterize the image with customized resolution. Takes longer but creates higher resolution bitmap images. g = Show[Graphics[{Red, rDisk}], Graphics[{Blue, bDisk}], Graphics[{Green, gDisk}], Graphics[{Blend[{Red, Blue}, 0.5], BoundaryDiscretizeRegion[rbDisk]}], Graphics[{Blend[{Red, Green}, 0.5], ...


9

You can use BoundaryDiscretizeRegion instead of DiscretizeRegion to avoid the mesh lines when using Antialiasing->True: Graphics[{ {Red, rDisk}, {Blue, bDisk}, {Green, gDisk}, Antialiasing->True, BoundaryDiscretizeRegion[rbDisk, MeshCellStyle->{2->Blend[{Red, Blue}]}], BoundaryDiscretizeRegion[rgDisk, MeshCellStyle->{2-...


6

pts={AngleVector[60°],{1,0},{0,0}}; colors=Join[{r,g,b}={Red,Green,Blue},Blend[#,0.5]&/@{{r,g},{r,b},{g,b}},{White}]; regions=BoundaryDiscretizeRegion/@RegionIntersection/@Rest@Subsets[Disk/@pts]; Graphics[Thread[{EdgeForm/@colors,colors,regions}]] or Graphics[Thread[{colors, MeshPrimitives[#,2]&/@regions}]] If need faster speed, I prefer use ...


4

If we represent each part as a piecewise spline we'll have an exact representation, as opposed to DiscretizeRegion which approximates the regions with polygons. I'll use splineCircle defined here. rDisk2 = FilledCurve[{splineCircle[rDisk[[1]], 1, {0, π}], MapAt[Reverse, splineCircle[bDisk[[1]], 1, {π/3, 2 π/3}], {1}], MapAt[Reverse, splineCircle[...


3

I tried to separate NMinimize j[a_?NumericQ, b_?NumericQ] := First@NMinimize[1 + a t+ b t^2 , t] but RegionPlot[j[a, b] >= 0, {a, 1, 3}, {b, 1, 4}] (*Show::gtype: Success is not a type of graphics. ... *) gives several error messages. As a workaround you might try zw = Flatten[Table[{a, b, j[a, b]}, {a, 0, 3, .1},{b, 0, 4, .1}], 1] (*message: ...


3

I have described integrating Mathematica and the open source 3D modeling tool, Blender 2.79b, in previous answers here and here. Your geometry does have some small features and concavity that can cause many meshers problems. Blender appears to be able to handle it. You will need to learn some python scripting to facilitate the integration but there are ...


2

This is an extended comment to demonstrate the results on my system $Version (* "12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019)" *) Clear["Global`*"]; ineq1 = r[2] + y r[3] > r[1] + y r[2] && (-1 + y) r[2] + r[4] < y r[3]; reg1 = ImplicitRegion[ ineq1, {{r[1], 0, 1}, {r[2], 0, 1}, {r[3], 0, 1}, {r[4], 0, 1}}]; int[y_] := Assuming[1 ...


2

Using color as the fourth dimension has severe limitations for regions that are solid in that you can only see the color of the surface of the region. While Opacity could be used to see "into" the solid region, the colors would be muddled together and you would not be able to appreciate the fourth dimension. ineq = α >= 2 β && 2 σ >= γ &&...


2

As @J.M. pointed out in the comments, the key here is the function RegionMember. Since you already know the region that you want to work with, namely Ellipsoid[XYMean, 1 XYCoVarMat], you can use Select as With[{rmf = RegionMember[Ellipsoid[XYMean, 1 XYCoVarMat]]}, Select[XYDATA, rmf]] {{0.997126,0.575375},{1.67482,1.73},{0.71546,1.72933},<<39325>>,...


Only top voted, non community-wiki answers of a minimum length are eligible