7
$\begingroup$

I ran across a wonderful animation on Wikipedia that gave a perfect geometric interpretation about the process of multiple integration (in this case, double integrals). Therefore, I am wondering if something similar can be done in Mathematica, and if it can also be extended to triple integrals. If anyone could also provide the code, I would be very grateful.

This goes way beyond my skill level in Mathematica, therefore I would not even know where to start.

animation

UPDATE

I found this that combined with the animation of the area sheets ($0$ to $ g(x,y)$), running from $x=a$ to $x=b$ and $y=f(a)$ to $y=f(b)$, could create the above animation. I think the hard part (at least for me) would be to create the animation of these sheets and synchronizing the movement with the segments in the x and y axis.

I found out that the above animation was created with Mathematica 9

$\endgroup$
  • $\begingroup$ Well, it has the distinct look of a 3D plot made by Mathematica, so I'm confident that 'something similar can be done in Mathematica'. As for triple integrals, 4D plots can not be made in Mathematica or with any other plotting software that I'm aware of :-) $\endgroup$ – m_goldberg Nov 8 '17 at 5:22
  • $\begingroup$ @m_goldberg oh ok! Thanks. For triple integrals I refer to when the integrand is 1, therefore it should be possible $\endgroup$ – DMH16 Nov 8 '17 at 6:14
15
$\begingroup$

I'll let somebody else do the lines and labels...

slices


f[x_, y_] := Sin[3 x + Sin[3 y]]

reg = BoundaryDiscretizeRegion[ImplicitRegion[x^2 <= y <= x^2/2 + 1,
                                              {{x, 0, 1}, {y, 0, 3/2}}]];
rmf = RegionMember[reg];

plane = Plot3D[-1, {x, -1/2, 2}, {y, -1/2, 2}, 
               ColorFunction -> (If[rmf[{#1, #2}], Blue, White] &), 
               ColorFunctionScaling -> False, Lighting -> "Classic", 
               PlotPoints -> 125];
int = Plot3D[f[x, y], {x, y} ∈ reg, PlotTheme -> "Classic"];

slices = SortBy[Cases[Normal[Plot3D[f[x, y], {x, y} ∈ reg, BoundaryStyle -> None, 
                                    Mesh -> {Subdivide[20]}, MeshFunctions -> {#1 &}, 
                                    PlotStyle -> None]], 
                      Line[l_] :> 
                      Polygon[Join[l, PadRight[Drop[l[[{-1, 1}]], None, -1],
                                               {2, 3}, -1]]], ∞], #[[1, 1, 1]] &];

fr = Table[Show[plane, int, Graphics3D[s], PlotRange -> All, 
           ViewPoint -> {-1.3, -2.4, 1.}], {s, slices}];

ListAnimate[fr]
$\endgroup$
  • 1
    $\begingroup$ The list of Polygon[]s in slices should have the components you need to make those lines. $\endgroup$ – J. M. is away Nov 8 '17 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.