Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.
  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

share|improve this question
2  
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. –  Michael E2 May 17 at 11:44
    
For formatting output in a Manipulate, study the four functions Style, Row, Column, and Grid. In this case I would most likely use Grid. –  m_goldberg May 17 at 14:20
    
Thanks a lot fellows! It works out great! –  Jack-Zhang May 19 at 3:45

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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