Message Boards Message Boards

0
|
7194 Views
|
8 Replies
|
7 Total Likes
View groups...
Share
Share this post:

Regarding the volume via an implicit method

Posted 10 years ago

Greetings!

May I know how should I obtain volume of an object using an implicit method?

Regards Corse

POSTED BY: Ben Corse
8 Replies
Posted 10 years ago

Thanks a lot I.M and Adam! your guidance has been great!

POSTED BY: Ben Corse

Use the same method as for volume, but define 2D region instead and integrate over this 2D region.

I.M.

POSTED BY: Ivan Morozov
Posted 10 years ago

Oh I see, I think the first assignment method should be good enough for me at this point, although I'll look through the other methods of assignment as well.

I have input arbitrary values into a,b,c and h into the implicitregion equation (with z conditions as: z <= -h && z >= -c).

what could possibly be done to obtain the cutting plane ?

I'm assuming I have to solve for the a and b values of the ellipse equation where z = -h (i.e. at the cutting plane)? In the plot, I have set h = 1

POSTED BY: Ben Corse

Ben,

There are several ways to do it, here is an example:

In[1]:= (* with assignment *)
v = a b c h ;
a = 1 ; b = 2 ; c = 3 ; h = 4 ;
v 

Out[3]= 24

In[107]:= (* with rules *)
Clear[v, a, b, c, h] ;
v = a b c h ;
v /. {a -> 1, b -> 2, c -> 3, h -> 4}

Out[109]= 24

In[4]:= (* with function *)
Clear[v] ;
v[a_, b_, c_, h_] := a b c h ;
v[1, 2, 3, 4]

Out[6]= 24

In[7]:= (* with pure function *)
Clear[v] ;
v = #1 #2 #3 #4  &;
v[1, 2, 3, 4]

Out[9]= 24

Also see this, where useful basic concepts are explained. In general you can get all you answers from Mathematica documentation.

I.M.

POSTED BY: Ivan Morozov
Posted 10 years ago
POSTED BY: Ben Corse

Great solution, Adam,

I was not enough patient to get Integrate[] result. In fact if you add a condition that h plane must intersect the ellipsoid than computation is almost immediate.

Volume[reg, Assumptions -> a > 0 && b > 0 && c > 0 && h > 0 && h < c]

and Integrate gives the same result as it should:

Integrate[1, {x, y, z} \[Element] reg, Assumptions -> a > 0 && b > 0 && c > 0 && h > 0 && h < c]

I.M.

POSTED BY: Ivan Morozov
POSTED BY: Adam Strzebonski

Hi,

Since version 10 it's possible to integrate over specified domain with both Integrate[] and NIntegrate[] functions. Consult documentation for details. Here is an example with NIntegrate[]:

R = ImplicitRegion[
    x^2/1 + y^2 + z^2 <= 1 && -0.5 <= z <= 0.5,
    {x, y, z}
   ] ;
RegionPlot3D[R]
NIntegrate[1, {x, y, z} \[Element] R]

I.M.

POSTED BY: Ivan Morozov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract