How Do I Find the Volume of a Rotated Solid Using MATLAB?

In summary, the conversation is about a person trying to solve a MATLAB problem involving finding the volume of a solid formed by rotating a region bounded by given curves around a specified axis. They have tried various resources but are still stuck and are looking for guidance on the steps to follow. They mention trying to use an equation for a circle with a displaced center and rotating it around the x-axis, and also considering using polar coordinates. They express frustration and ask for specific instructions on how to assign the volume, integral, etc.
  • #1
[sammich]
4
0
I've been trying to solve one of my MATLAB problems for about 2 weeks now and I am completely lost as to how to solve it. It seems like it would be rather easy to do, but I cannot figure it out.

I have referenced our Calculus 2 textbook, MATLAB textbook, and Google but I'm still stuck.

The problem says:
Code:
"The region bounded by the given curves is rotated about the specified axis.
Find the volume of the resulting solid by any method."

x[SUP]2[/SUP]+(y-1)[SUP]2[/SUP]=1

I tried something along the lines of:

Code:
syms x y
eq=(x^2)+((y-1)^2)-1

fplot(eq, [0,10])

%a=fzero(eq -blah blah etc- )

but that doesn't work, and even if it did, I don't know where to go from that point.

Can anyone walk me through the steps? This type of problem seems quite important, and I'm worried by the fact that I can't find any help on it. I want to make sure I know how to do it in the future!

Thanks in advance :)
 
Physics news on Phys.org
  • #2
So its a circle with radius 1 from looking at the equation, displaced by 1 along the y axis. Then its rotated around the x axis? Volume = (4/3) pi , the volume of a sphere.

OR integrate it, going to polar coordinates to make it easier.
 
  • #3
Thanks for the response.

I tried solving for y and all, I just can't make it go through.

We are going to have 4/3*pi*r3 evaluated at r=0 and 1, correct? Or am I completely off?

What would I type into MATLAB to assign the volume, integral, etc?

*slams head against keyboard*
 

1. How do I rotate a 3D object around the X-axis in MATLAB?

To rotate a 3D object around the X-axis in MATLAB, you can use the rotate function with the syntax rotate(h,direction,alpha), where h is the handle of the object, direction is the axis of rotation (in this case, it would be 'X'), and alpha is the angle of rotation in degrees.

2. Can I rotate multiple objects around the X-axis at the same time in MATLAB?

Yes, you can rotate multiple objects around the X-axis simultaneously by passing an array of handles to the rotate function. For example, rotate([h1,h2,h3],'X',alpha) will rotate objects with handles h1, h2, and h3 around the X-axis by an angle of alpha.

3. How do I specify the center of rotation when using the rotate function in MATLAB?

You can specify the center of rotation by using the optional argument 'center' in the rotate function. The syntax would be rotate(h,direction,alpha,'center',c), where c is a 3-element vector specifying the coordinates of the center point.

4. Is there a way to undo a rotation in MATLAB?

Yes, you can undo a rotation by using the invert function. This function takes the same arguments as the rotate function and rotates the object in the opposite direction, effectively undoing the original rotation.

5. Can I animate a rotation around the X-axis in MATLAB?

Yes, you can animate a rotation by using a loop and updating the rotation angle in each iteration. You can also use the drawnow function to update the figure in each iteration, creating a smooth animation of the rotation.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
992
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
818
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
561
Back
Top