# Solid of Revolution – Comparing Methods #2

To get my solid, I rotated the area between the curves $$y=x$$ and $$y=x^2$$ around the line $$y=1.25$$.  I then approximated it by cylindrical shells.  The width of each of my shells was 1/16 and the height was $$x^2-x$$, where the $$x$$-value was chosen from the right endpoint of each interval.

One of the issues with the print comes from the fact aht  the top shell does not connect smoothly to the shell below it.  Initially I thought that this resulted from an error in the printer.  When I looked at the Cinema 4D file, however, I discovered that the top shell does not make contact with the shell below it because its height is less than 1/16 (the bowl shape is very flat there).  Additionally, the shell second from the top does not make contact with the shell below it, but the height difference is not noticable.  Another issue with the print was that the leftover supports look bad.  The inside of the object was filled with them, and even after clearing out most of the supports, it still looks terrible.  We are thinking about printing the object on a different printer, such as the Form Labs printer (which uses stereolithography) or the ProJet 260 (which uses powder), in order to get the inside part of the object to look clean.

# Intersecting Cylinders – The Steinmetz Solid

My next goal was to print two cylinders whose axes intersect at right angles and the volume common to both, otherwise known as the Steinmetz solid. I began by modeling these objects in Mathematica so I could import the objects to Cinema 4D as well as create an interactive Mathematica worksheet about these objects.

Here are the Mathematica representations of two objects I planned to print:  I exported the top object as a .wrl file into Cinema 4D since it was already a solid.

For the bottom object,  I decided it would easiest to create it from scratch in Cinema 4D using the “Tube” object and simply adjusting the dimensions and orientation.

I attempted to print the intersecting cylinders on the Afinia printer in the Math Department. It failed to finish printing because the filament got tangled coming off of the spool. However this was not a complete fail since it shows the inside of the two cylinders and can still be used as a teaching tool.

I am currently attempting to reprint it and will see how it goes!

Update: The filament got tangled once again while I was printing resulting in a similar object to the one above. We decided that these were both better teaching tools than the original design and decided not to try to print again. I printed the Steinmetz solid on the MakerBot 2x and had great results! This object can be found on Thingiverse here and here.

# Solid of Revolution – Comparing Methods #1

We decided to find a solid of revolution for which both the washer method and cylindrical shell method worked and to model it with both methods. Laura Taalman has done similar designs for shell approximations which can be found here and here

We decided to rotated the area between $$y=x$$ and $$y=x^2$$ about the line $$y=1.25$$. This created a bowl-like object which is curved on the outside, straight on the inside and with a hole at the bottom of the bowl. We split this project up and I created a model of the object using the washer method, while Ryan used the cylindrical shell method. We planned to each use 16 slices/shells so we could compare our two models later.

Creating this object was a very similar process to that of creating the sphere with washers. Since I was using 16 washers and the object has a height of 1, each washer was 1/16 thick. In Cinema4D I used the preprogramed tube object and made each of them to have a height of 1/16. In order to calculate the inner and outer radius of each washer I used the value of middle of each washer, 1/32, 3/32, 5/32, 7/32, etc. I plugged these values into the equation $$f(x)=1.25-x$$ for the inner radius value and $$g(x)=1.24-x^2$$ for the outer radius value. The only other thing I had to change for each was was its height coordinate. My washers in Cinema4D were parallel to the $$xz$$-plane so I adjusted each washer’s $$y$$-coordinate so they would be spread out to the correct height. I increased the $$y$$-coordinate of each was by 1/16 (the height of each washer) from the previous.

Since I used the preprogramed tube object I was unable to use Magic Merge easily to connect these object and instead just used the ‘Connect + Delete’ command under the ‘Mesh’ tab. This means that there are inner walls in my object, but since each washer is relatively small this is not hugely problematic and adds extra support.

I ran into one issue when I was finishing up with my object. The smallest washer (and the last one I created) did not touch the previous washer. All the other washers had been able to lie on top of the previous one since their outer radius was larger than the inner radius of the previous washer. The 15th washer had an inner radius of 0.34375 cm and the 16th washer had an outer radius of 0.31152cm and thus there was a gap. This is due to the fact the bowl is very flat at the bottom.

We decided to remedy this we would just delete the 16th washer and make a note of it here as well as in the description of the object on Thingiverse.

We printed Ryan’s object with cylindrical shells using the Makerbot and the supports on the inside were difficult to remove and didn’t look good. We are currently discussing printing on another printer for these objects and I will update later on how that goes!

# Volumes by Slicing – General Slices

My second project this summer was to create a solid with a circular base and with equilateral triangles as the parallel cross-sections perpendicular to the base. I modeled this solid with 20 triangles and 10 triangles.

In order to create the triangular prism cross-sections I used Mathematica. I decided to use the circle $$x^2+y^2=25$$ for my base, and assumed that the cross-sections were perpendicular to the $$y$$-axis. In Mathematica, the triangular prisms were created using coordinates for the three vertices and the desired thickness. For the 20-slice object each triangle prism was 0.5 cm thick and for the 10-slice object they were 1 cm. I calculated the three coordinates for each cross-section by using the midpoint of each slice. So for the 20-slice object I used $$y$$-values of 0.25, 0.75, 1.25, 1.75, 2.25, 2.75, 3.25, 4.25, and 4.75. (I only had to use 10 values since due to the symmetry of the circle.) Similarly, for the 10-slice object I used $$y$$-values of 0.5, 1.5, 2.5, 3.5 and 4.5. I then calculated the $$x$$-formula for the points on the circle using $$x=\sqrt{25-y^2}$$. The three coordinates of the triangle were then $$(-x,y), (x,y)$$, and $$(0,x\sqrt{3})$$. To make it easier to create the triangular prisms in Mathematica, I shifted the bottom left corner to each triangle to the origin so that the three coordinates for my equilateral triangles were $$(0,0), (2x, 0)$$, and $$(x, x\sqrt{3})$$. After creating each slice I exported the triangular prisms from Mathematica as .wrl files and imported them into Cinema 4D.

In Cinema 4D I arranged each slice to have the correct coordinates and created my objects. Since these slices were created in Mathematica I could extend them from only one side and not both (like with the disks in my previous post). This was perfect for using the plugin Magic Merge. I wanted to extend the triangles from one side into the larger one next to them in order to use Magic Merge. This is where I ran into trouble! Each triangle would only extend from one side and, since the smaller triangles had to overlap with larger ones in order to maintain the mathematical accuracy from my calculations, that meant half of them wouldn’t overlap.

In order to fix this, I had to rotate those individual triangles 180° and changed their coordinates accordingly so that I would be able to extend them correctly to overlap. Once I had done this I used Magic Merge to create the solid and then exported the .stl file for printing. When I went to print my object upright I ran into some problems. It seemed that I had forgotten to merge part of the object and it was printing the inner walls upright which resulted in double the print time and cost. I rotated the object so that the slices were parallel to the build bed – this meant the print required supports. It now looked correct in print preview and printed correctly. My final object from this print looked good, but was rough on one side from removing the supports and I knew if I could fix my problems I would be able to print it with a hollow inside and without supports.

I went back and merged all of my cross sections again (and this is another reason to always save a separate file of your object before you merge because this makes things a lot easier to check). Now when I exported the file and went to print, my print preview only had certain parts of the object showing up. When I tried to fix this I realized that I hadn’t checked the normals of the slices I had imported from Mathematica. Going back to my saved file I changed the normals so they all aligned in the correct direction. Now I could finally print my object upright with a hollow inside thanks to Magic Merge. These objects can be found on Thingiverse here and here. # An unexpected bonus We have made some wonderful 3d printed models recently. As an unexpected bonus we have also created some great Mathematica notebooks. These were developed as we first created the shapes in Mathematica, then imported them into Cinema 4D, to finally create the .stl file ready for 3d printing. The notebooks have a mix views of the shapes and also some neat Mathematica Demonstrations that can be used when teaching. They can be found here.

# Volume by Cylindrical Shells On Monday, June 15, I modeled a volume by cylindrical shells from Calculus II.  I used Example 1 in 7.3 of Stewart’s Essential Calculus, which is a volume of revolution of the curve $$y=2x^2-x^3$$ about the y-axis. This is shaped a bit like a stadium. The plan is to approximate this volume using 16 cylindrical shells. I first sketched out the curve in 2-dimensions to get a feel for the profile of the shape. Next, I wrote out each point on the curve from $$x=0$$ to $$x=2$$ in intervals of length 1/8, namely $$(0,0), … , (1.875,0.439), (2,0)$$.

Each cylindrical shell is determined by its height, the thickness of the shell and either the inner or outer radius. By construction, each shell has thickness 1/8 and for each $$k=0,1,2, \dots, 15$$, the inner radius of a shell is $$k/8$$, while the outer radius is $$(k+1)/8$$. I chose the height of each shell to be $$f(k/8)$$, which is the the $$x$$-value closer to the origin.

To summarize, if $$r=$$inner radius of shell, $$R=$$outer radius of shell, and $$h=$$height of tube, then for $$k = 0, 1, 2, \dots , 15$$,

$$r = k/8, \quad R = (k+1)/8, \quad h=2r^2 – r^3.$$

Since the height function is increasing between $$x=0$$ and $$x=4/3$$, the cylindrical shells lie inside the volume of revolution. Between $$x=4/3$$ and $$x=2$$, the function is decreasing and the shells lie outside the volume. I then made a model of this Riemann approximation for the solid in Cinema 4D by inserting tubes (Cinema 4D’s name for “cylindrical shells”) of inner radius $$r$$, outer radius $$R$$, and height $$h$$. When Cinema 4D inserts a tube, it places half of the tube above the $$xy$$-plane (the $$xz$$-plane in Cinema 4D) and half of it below. Therefore, I needed to add half of each tube’s height to put each shell onto the $$xy$$-plane.

The object was first printed with the supports setting on just in case, although I thought that they did not need supports. The result was that a couple superfluous strands of plastic running along the shells, which needed to be removed. Given the geometry of the shape, I would advise against using supports in building this object.

I would advise that you use a raft to build this object, however, because it was very difficult to remove the object from the build plate. (It took 5 minutes of very careful tugging by David Pfaff.)

You can find this objects on Thingiverse here.

# Volumes by Slicing – Disk Method

Ryan and I began this summer by reviewing problems from Calculus II in James Stewart’s Essential Calculus Second Edition. I started by looking at Section 7.2, Volumes by Slicing. In Section 7.2 the first method introduced is the disk method. Here a volume is approximated by very thin cylinders, which we (confusingly) call disks. There is a great picture in Example 1 of Section 7.2 showing spheres approximated as Riemann sums of disks. I decided my first project would be to make these three spheres. I began with the sphere $$x^2+y^2=25$$. This is a sphere of radius 5, centered at the origin. I assumed the units were centimeters, so the diameter of the sphere was 10cm.

To calculate the height of each cylinder used to create these disks I simply divided 10cm by the number of disks I planned on using.

In order to calculate the radius of each cylinder, I used the equation $$y=\sqrt{25-x^2}$$, where $$y$$ was the radius and $$x$$ the $$x-$$coordinate of the center of each disk. For example, for the 10-disk sphere I used the $$x-$$values: 0.5, 1.5, 2.5, 3.5, and 4.5. I only had to do calculations for half of the disks since the sphere is symmetric. For the 20-disk sphere I used the $$x-$$values: 0.25, 0.75, 1.25, 1.75, 2.25, 2.75, 3.25, 3.75, 4.25, and 4.75. I decided to make the entire object in Cinema 4D and not use Mathematica at all. In Cinema4D, under the ‘add cube’ button I selected ‘cylinder’ to add cylinders to my working screen. To make these cylinders the correct dimensions for the disk method I used the calculations described above. I also used the same calculations and numbers to find the coordinates of each cylinder in order to line them up to create the sphere. Each cylinder’s coordinates were based on the center of the object so two of the coordinates were 0, while the third was the $$x-$$value described above. (Precisely which of the $$x,y,z$$ coordinates were used depended on the orientation I chose for the cylinders).

Once I had created all the cylinders and placed them in the correct places, I needed to make the sphere into one object. To do this, I selected all of them and made them editable (into polygons). Then under the ‘Mesh’ menu at the top of the screen I selected ‘Conversion’ and ‘Connect Objects + Delete’.

The final step in Cinema 4D was to export each sphere as an .stl file. I printed the 10-disk sphere first without any issues on a MakerBot2x.

When I went to print the 20-disk sphere later on that week, the object broke when removing it from the build bed of the MakerBot2x printer I was using. In order to remedy this issue, we decided to flip the sphere so the disks would be perpendicular to the build bed. More on this later.

Below are the final results of the 20-disk sphere and 10-disk sphere!

These objects can be found on Thingiverse: Sphere: 10 disks and Sphere: 20 disks. 