Tag Info

New answers tagged

0

To combine the 2 plots, you can use Show. In addition, since Show takes its options from the first plot, you can override these by using PlotRange->All in the Show itself, at the end. Like this Manipulate[ Show[ Plot3D[...], Plot3D[...], PlotRange -> All ] , ....]


3

One approach is to use Inset. DateListPlot[{1, 1, 2, 3, 5, 8, 11}, {2000, 8}, Prolog -> Inset[Graphics[{GrayLevel[.6], Rectangle[Scaled[{.5, .1}], Scaled[{.7, .3}]], Rectangle[Scaled[{.7, .3}], Scaled[{.9, .5}]], Rectangle[Scaled[{.9, .5}], Scaled[{1.1, .7}]]}]]] Some experimentation may be necessary to place multiple shaded areas in their ...


1

Works for me: gam1 = 2; gam2 = 1 - 2 I; ℛ = Polygon[{{0, 0}, {Re[gam2], Im[gam2]}, {gam1 + Re[gam2], Im[gam2]}, {gam1, 0}}]; NIntegrate[x^2*y^2, {x, y} ∈ ℛ] (* 18.3111 *)


2

RegionPlot can find boundaries between implicit regions even with a small number of PlotPoints. For example, you have 4 implicit regions ineqs = {-2 <= x <= 0 && -2 <= y <= 2 && x^2 + y^2 >= 1, x <= 0 && x^2 + y^2 <= 1, x >= 0 && x^2 + y^2 <= 1, 0 <= x <= 2 && -2 <= y <= ...


1

Would this work for you? As I understood, your goal was a boundary in the middle of the region. bmesh = ToBoundaryMesh[ "Coordinates" -> {{0., 0.}, {1., 0.}, {1., 1.}, {0., 1.}, {.5, 0}, {.5, 1}}, "BoundaryElements" -> {LineElement[{{1, 2}, {2, 3}, {3, 4}, {4, 1}, {5, 6}}]}] bmesh["Wireframe"] mesh = ToElementMesh[bmesh]; mesh["Wireframe"] ...


7

I suppose MeshRegion and Graphics3D have similar methods of the visualization. However, Graphics3D is more convenient and GraphicsComplex can increase the performance: mesh = ReadFSMesh@"fsmesh.bin"; brain = GraphicsComplex[MeshCoordinates@#, MeshCells[#, 2]] &@mesh; Graphics3D[{EdgeForm[], Gray, brain}, Lighting -> "Neutral", Boxed -> False] ...


0

Today I got a couple of emails from WRI tech support. The first indicated that they had accepted this issue as a bug. I have filed a bug report with the development team. Thank you very much for giving us feedback and hopefully this issue would be improved in future release. The second email retracted the first and reclassified the problem as a ...


4

Here is another way, which is more straightforward than my other answer. At first, I got stumped by couple of things, including, it turns out, a Bug in ArcLength?, and I didn't have time to explore the issues. Instead of using a "BoundaryMarkerFunction" we can list the markers directly in LineElement[elements, markers]. We can make a fairly general ...


2

This is a syntax issue. Use ymin = NMinimize[f[x], {x} ∈ Interval[{0, π}]] instead. (* {-1., {x -> 0.}} *) Update Using ImplicitRegion has the same issue. {x} must be used instead of x ymin = NMinimize[f[x], {x} ∈ ImplicitRegion[0 <= x <= π, {x}]]


7

You might create a NearestFunction to help pick the particular boundary you want. You can use it to mark the boundary elements of an ElementMesh (FEM). plot = ParametricPlot[ bezierfunc[ξ, η], {ξ, 0, 1}, {η, 0, 1}]; edges = Map[ First@Cases[ Normal@ParametricPlot[#, {t, 10^-5, 1 - 10^-5}, PlotPoints -> 100], Line[p_] :> p, ...


5

reg = ImplicitRegion[{Sin[Pi x] == y, x <= 1, x >= 0}, {x, y}] This is a 1D region embedded in 2D space. NIntegrate needs to know this to produce a reasonable result. My guess is that it uses RegionDimension, which fails here: In[41]:= RegionDimension[reg] During evaluation of In[41]:= RegionDimension::nmet: Unable to compute the dimension of ...



Top 50 recent answers are included