1
$\begingroup$
  1. As in the title, I want to output the image of a 3D body with its volume and surface area shown nicely beside it. (Maybe in a table?) But how can I do it?
  2. Is it possible to calculate the surface area for each specific facets?

For example, consider the simple case:

Manipulate[
  {RegionPlot3D[x + y + z < A, {x, 0, 1 - A}, {y, 0, 1 - A}, {z, 0, 1 - A}, 
     PlotRange -> {0, .5}],
   NIntegrate[Boole[x + y + z < A], {x, 0, 1 - A}, {y, 0, 1 - A}, {z, 0, 1 - A}]}, 
  {A, 0, .99}]

What I can get so far is showing both the plot and data but not formatting it well.

Current progress

$\endgroup$
  • 2
    $\begingroup$ Formatting: PlotLabel, Row, Column, Grid, Labeled,.... Question 1 is a little vague, but Row might be what you're after. I think you'll have to play around to see. The second question might be better asked as a separate question. $\endgroup$ – Michael E2 May 17 '14 at 11:44
  • $\begingroup$ For formatting output in a Manipulate, study the four functions Style, Row, Column, and Grid. In this case I would most likely use Grid. $\endgroup$ – m_goldberg May 17 '14 at 14:20
  • $\begingroup$ Thanks a lot fellows! It works out great! $\endgroup$ – Jack-Zhang May 19 '14 at 3:45
1
$\begingroup$

Consider this:

   Manipulate[
     Grid[{{

        RegionPlot3D[
         x + y + z < A, {x, 0, 1 - A}, {y, 0, 1 - A}, {z, 0, 1 - A}, 
         PlotRange -> {0, .5}],

        PaddedForm[Round[NIntegrate[
           Boole[x + y + z < A], {x, 0, 1 - A}, {y, 0, 1 - A}, {z, 0, 
            1 - A}], 0.01], {5, 2}]
        }}],
     {A, 0, .99}]

Rounding plus Padding prevents resizing of your output

$\endgroup$

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.