# MATLAB 3D plot in MATLAB of a sphere inside an open pit.

#### mulface

Ok so im trying to do this project for uni.

"A working pit is plan to be dug to host a football alike object. The shape of the object is
given by the following equation

X^2+Y^2+(1/4*Z^2) = 25

The object will be put into the place from above, and the wall of the pit must have at least
1 meter clearance from the object in all directions.
Use matlab to calculate the volume of the pit, and plot in 3D to show where to dig, and
where the object will be hosted.

Aim:

Practice on matlab for the following topics
Draw 3D surface plot.
Numerical integration.
Enhance the graph."

Can anyone help me out, I have this so far...

[x,y,z]=sphere(20);
mesh(x,y,z)
(x^2)+(y^2)+(0.25*z^2);
surf(x,y,z)
axis vis3d on
light('Position',[-3 -1 3]);

Related Math Software Workshop News on Phys.org

"3D plot in MATLAB of a sphere inside an open pit."

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving