Modeling Ice Cream in Mathematica

One of the many skills taught in Multi is how to mathematically model shapes in 3-Dimensional space. Mathematica is a useful tool that aids in visualizing how multivariable functions can create 3-D shapes. Using this program, we aimed to explore how one could model a cone of ice cream in the third dimension. We first began by creating a sphere. Using the “ParametricPlot3D” common, we used our knowledge of Parametric equations to parameterize and graph a sphere. The coordinates we plugged into Mathematica to create this sphere were x=ρ sin( φ ) cos(θ ); Y=ρ sin( φ ) sin(θ ); Z=ρ cos( φ ). θ is the magnitude of by how much the 3-D figure has rotated around the z-axis on the x,y plane. φ is the rotation above and below the x,y plane. The radius of this rotation is represented by cos(φ). When combining all three planes: X-coordinate will be (ρ)sin(φ) or our radius times cos(θ), or the angle at which the shape is rotating around the z-axis on the x,y plane. The y coordinate will be the (ρ)sin(φ) times sin(θ), which represents a different radius. The Z coordinate will be a complete function of φ, or just (ρ)cos(φ) because it represents how far above the x,y plane the sphere truly is. In order to determine the range the shape will be defined, consider that for any given φ, θ will make a full rotation, meaning that in radians it will be parameterized by 0 ≤ θ ≤ 2π. With φ essentially representing the altitude in the Z direction, it goes from 0 ≤ φ ≤ π. ρ will be set constant at 1.

We then created a 3D-Contour Plot for a cone. This was done by using the contour plot function in Mathematica with the equation for a three-dimensional cone being sqrt[𝑥2 + 𝑦2] with the parameters being − 2 ≤ 𝑥 ≤ 2 ; − 2 ≤ 𝑦 ≤ 2 ; − 0. 5 ≤ 𝑧 ≤ 2. It was important that the x and y parameters be symmetrical as they were responsible for creating the disks or slices that form a cone while z was responsible for the radius of these circles as well as their position in space. So the -0.5 value is responsible for the small point at the bottom of the cone while the 2 allows the cone to open up and match the circular shape of the disk the x and y values create at that point. A contour plot was chosen for the cone while a parametric plot was chosen for the sphere to show how Mathematica can use multiple concepts to create 3D images.

The final 3D image of the ice cream cone was made using the pre-programed sphere and cone inputs in mathematica. Colors were then added into the code to change the colors of the spheres and cone. The spheres were overlaid with one another and their radii were adjusted to form a cohesive shape. The radius of the top of the cone and the green sphere were equal to one another so that the two shapes fit together. The cone remained at the z = 0 position while the green sphere position was adjusted slightly above it and the other two spheres were then positioned to overlay on top of the green sphere. Slightly different radii were chosen for the spheres to model how there is variability among spheres in something like a real life ice cream cone; no scoop is the same!

About The Author

Leave a Reply

Your email address will not be published. Required fields are marked *