Student Post: Replicating Real Life

Another awesome thing about 3D printing is that you can replicate things that already exist without having to rebuild them from scratch. Using 3D scanning technology it is possible to digitize existing objects and then bring them back in to the physical world with a 3D printer. This is one of they things I am attempting to do this semester with a Duke Dog statuette. For the JMU Centennial 10 years ago, a number of statuettes were created (see here), one of which now goes out to various events throughout the year. This statuette is getting quite old and beat up, and would be very expensive to recreate with traditional means since the original molds are gone. So using 3D scanning and printing we are hoping to be able to create something that may be able to replace this Duke Dog.

At the beginning of the semester we did a few 3D scans with a Structure Sensor scanner on an iPad. These scans turned out surprisingly well and I have been slowly trying to clean them up and make the model look alright (but I’m not an artist so…). The original statuette is quite large and certainly too big to print in one piece on any printer we have, and even Shapeways cannot print it at full size. So the goal is to come up with a good way to cut the model into parts so that each part can be printed at larger scale and then assembled into a full-scale model that is larger than a single print volume.

My initial cut method did not use flat planes and the pieces did not join very good along the seams so there are quite large gaps. However, it did work for creating a model larger than a single print volume. It also allows for the parts to be printed in different orientations that do not need as much support material and don’t mar the surface of the model as much as a single piece print. The issue of supports and poor surface quality is not a big deal if we were using something like Shapeways, but for the purposes of prototypes it is more important to consider.

Here are pictures of the first pieced together print that I did from my initial cut method. I am working on finding a better method for cutting that will not create such bad seams and will allow the parts to fit together better. Having flat interface surfaces between parts will also allow me to hopefully create alignment pins so that orientation when assembling is not an issue. Being able to cleanly hollow the parts is also a goal so that we can reduce the cost of printing with a service like Shapeways.

Until next time… — Quincy Mast

Student Post: Variations in Size on General Petersen Graphs

Hello again!

One more blog post dealing with Petersen Graphs. Last week we saw several examples of embeddings of Petersen graphs. Since one of the main goals behind creating those realizations is to 3D print them. As such, it is important that the dimensions of our embeddings are reasonable. In the previous embeddings, the graphs were realized with edges of radius .02mm. The realizations from last time were created using code that hard coded most of the dimensions of the objects instead of using any of the inherent values of a Petersen graph. Since then, the code has been changed to be much more general (also allowing it to be more readable). I have also changed the code to include the vertices of the graphs as well to more effectively demonstrate the properties of a Petersen graph.

The following example is of GP(12, 4) where the edges have radius 2mm and the spherical vertices have radius 3mm. The radius of the approximated circle created by the outer ring (in blue) is 50mm. The height of the graph is also reasonable dimensioned in this embedding.

App Sized Double Thickness Centered Terraces GP 12 4

The code that produced this example is relatively robust in terms of what dimensions it can produce when realizing these embeddings of Petersen graphs. The smaller n/k is the more variability there is in how large the radius of the edges of the graph can be. I also took a suggestion to realize the graph with the base in the center, creating a beautiful embedding.

This example is of GP(40, 10) where the edges have radius 1mm and the base has radius 50mm. The height on this graph however is ~200mm.

Modified Steel Cable Structure GP 40 10

The biggest issue with this code is that it is not very robust in terms of the size of the radius of the edges. Last week we had an example of GP(60, 12) which was very tight and had a “steel cable” in it. However, this code was only able to produce an embedding with no intersections due to the tiny radius that was being used. This example however has edges that are just thick enough to print. Given the height of this graph, one might be interested in an embedding that doesn’t have such proportionally thin edges.

As stated last time, now that we have some relatively printable realizations of general Petersen graphs, I’m going to shift my focus to working with n-panelled and n-flat graphs for next time.

Thanks for reading!


-Ben Flint

Student Post: Several Generalized Petersen Examples

Welcome back!

My last blog post dealt with learning some of OpenSCAD to tackle the problem of representing graphs in 3D, culminating in some OpenSCAD code that would draw any generalized Petersen graph. To do so, I wrote code that would take in values for the parameters that define a Petersen graph and then use a dedicated loop to draw three edges of the graph at a time by rotating 360/n degrees each time the loop was run. This created a very interesting representation of a Petersen graph where the outer rim was drawn entirely on one plane with the edges approximating a circle and the inner rim was drawn on a plane that was parallel to the outer rim. The inner rim, when drawn in a plane, creates many intersection points between the edges of the rim. However, one might have reason to be interested in representing graphs in 3D without any intersections.

I have started working on the problem of representing general Petersen graphs without any intersections between the edges that make up the inner rim (recall that they take the form (i + k)’ where (i + k) is read mod n). One thing to note before I jump into how I represented these graphs is that the edges of the inner rim form a set of cycles, C. If k divides n then these cycles will be of length m where k * m = 0 mod n and |C| = k. If k does not divide n, then |C| = 1 and that cycle will have length m = n. Thus the inner rim of GP(12, 3) will have cycles of length m = 4 and |C| = 3.

Keeping that in mind, my first attempt at drawing Petersen graphs was to draw the distinct cycles on their own planes. However, this ONLY works for generalized Petersen graphs where k divides n, because as we saw, attempting to draw generalized Petersen graphs where k does not divide n with the single cycle in the plane results in many intersections. My first attempt at drawing these graphs works by raising each vertex by a set amount. To isolate the cycles, I realized that the distinct cycle starting at vertex i’ had vertices {i’, (i + k)’, (i + 2k)’, … , (i + (n-1)k)’}. I also noted that each one of these vertices is the same mod k. Then to correctly graph the distinct cycles, I changed the height of each point by a set amount depending on its value mod k. The results presented some very interesting examples of Petersen graphs, including the following: Terraces GP 12 3The Colliseum GP 60 4The Highrise GP 60 12Top Down GP 60 12 The first of these examples is a representation of GP(12, 3), the second of GP(60, 4), and the third and fourth are of GP(60, 12) (the fourth is a top down view of GP(60, 12)). One interesting thing to note about the representation that I’ve chosen to implement is only partially successful at representing general Petersen graphs without any intersections. First there is the obvious issue that this code is severely limited in that it can’t represent any Petersen graph where k does not divide n. The second is that, even if given n and k such that k divides n, if the value of n is too large compared to the value of k, the cycles will be so long (have too many edges) that each edge will be short and intersect with the edges making the spokes of the graph. This can be seen in the second example, the representation of GP(60, 4), which I like to call “The Coliseum”. In “The Coliseum” each cycle has length 15 but there are only 4 such cycles.

I decided that the first of these issues that I would tackle would be that this code cannot represent generalized Petersen graphs for any valid values of n and k. In order to rectify this, I wrote a new function that assigned a different height to each vertex. Then I changed the function that drew the edges of the inner rim to modify the height based on its value (i + k)’ mod n. The resulting code could draw any generalized Petersen graph with valid values for n and k where the first half of the inner rim edges have rising height and the other half have descending height. This code is much more robust than the other code in that it can draw many more generalized Petersen graphs and still maintains the property that distinct cycles are all raised to different heights. However, given how close the rising edges are, the thickness of the edges had to be lowered significantly to avoid intersections. Consider the following three examples this code has produced:

The Crazy Coaster GP 11 3Funland Ride GP 12 3Steel Cable Suspension Structure GP 60 12

At first glance, the first two pictures look like they represent the same graph, but on closer inspection, the first represents GP(11, 3) and the second represents GP(12, 3). A fine distinction, to be sure but note that GP(11, 3) only has one distinct cycle, whereas all three distinct cycles of GP(12, 3) can be picked out. The third example represents GP(60, 12). Given the perspective of the picture, it can be difficult to see, but this graph is embedded with no intersections. The resulting graph looks a lot like a structure that is being suspended by tightly knit steel cables that are under tension. Though this code is more robust in the amount of Petersen graphs that it can represent, it is still plagued by the issue of drawing Petersen graphs with large values of n and small values of k without intersections.

For next week, I intend to move away from Petersen graphs and start working on representing examples of flat and panelled graphs following along with the paper On n-panelled spatial graphs, n-flat graphs and graph minors by Ryo Nikkuni and Yukihiro Tsutsumi.

As always, thank you for reading!

-Ben Flint


Nikkuni, Ryo, and Yukihiro Tsutsumi. “On n-Panelled Spatial Graphs, n-Flat Graphs and Graph Minors.” preprintWeb.

Student Post: General Petersen Graphs in OpenSCAD

The field of graph theory is diverse and interesting. There are many topics to explore and endless different representations of different graphs. A particularly interesting side of graph theory to explore involves different embeddings of graphs in 3 Space. This is exciting in part due to the modern ability to 3D print. Given that there are so many different ways to embed the same graph, one has reason to be interested in spatial embeddings of graphs that illustrate the unique and interesting properties of a graph. Considering the question of which embedding to choose is putting the cart before the horse however, as there is a more pressing question to consider: How do we represent spatial embeddings of graphs at all?

Towards answering that question, I have been learning to use OpenSCAD in order to model graphs. A class of graphs I find interesting are the Generalized Petersen graphs.  A Generalized Petersen graph, GP(n, k) has 2n labelled vertices with labels 0, 1, … , n-1, 0′, 1′, … , (n-1)’ and edges of the form (i, i’), (i, i+1), and (i’, (i + k)’) where all numbers are read mod n. The edges (i, i+1) form the “outer” rim of the graph, the edges (i’, (i+k)’) form the “inner” rim of the graph, and the edges (i, i’) form the “spokes” of the graph. It has been shown that all Generalized Petersen graphs have a Tait coloring. A Tait coloring of a trivalent graph (each vertex has three edges attached or valence 3) is an edge coloring in three colors of the graph where each vertex is adjacent to all three colors. I decided to try and realize an a Tait colored embedding of GP(11, 3) in OpenSCAD.

Learning to use OpenSCAD has been an adventure in realizing that all the coding tips and tricks I’ve picked up still apply. At first, I approached the problem of drawing GP(11, 3) by hard coding every edge. After realizing that that was tiring and a pain, I started using loops to draw the outer rim and the spokes of the graph. I wrote loops that drew the outer rim and the spokes of GP(11, 3). The loops worked by drawing an edge between vertex 0, (1, 0, 0), and vertex 0 rotated by 360/11 degrees (vertex 1) as well as between vertex 0 and vertex 0′, (1, 0, dist(vertex 0, vertex 1)) then drawing an edge between vertex 1 and vertex 1 rotated by 360/11 degrees (vertex 2) as well as between vertex 1 and vertex 1′, etc. From there I realized that not only could I condense the two loops I had written but that I could draw the inner rim in the same loop as well. Note that this embedding draws the outer rim as a polygon approximating a circle. This picture of a crown was my first attempt at drawing both rims and the spokes of the graph in the same loop. The Crown

This picture illustrates the outer rim but not the spokes or the inner rim. I had used the wrong points in the OpenSCAD code trying to create the spokes and inner rim which had connected the spokes to two vertices on the outer rim instead of across the graph to create the inner rim. This obviously does not follow the correct form for a Generalized Petersen graph, but it did result in a pretty circlet that could be colored and printed.

After inadvertently making the crown, I starting thinking about how I could draw the inner rim in for any valid k given instead of hard coding GP(11, 3). I also realized that I could easily change my current code to correctly draw the outer rim and spokes for any given value of n by rotating by 360/n degrees instead of 360/11 degrees. In order to draw the inner rim, I chose to use a similar method to the one I used to draw the outer rim and spokes . To draw the inner rim, vertices i’ and (i+k)’ have to have an edge. In order to draw this in using the same loop, I drew an edge between vertex 0′ and vertex 0′ rotated by k*360/n degrees (vertex (0+k)’) and repeated that process the same way as before. This created a properly drawn embedding of GP(n, k) given valid parameters. I decided that aesthetically having the i and i’ vertices be aligned vertically was not pleasant to look at, so I modified that code so that the “lower” (outer) rim could be scaled. Doing so resulted in the following picture of a peanut butter cup (GP(11, 3)).Peanut Butter Cup

Looking at this peanut butter cup was much more pleasant and also illustrative of a fun geometric property of GP(11, 3). When looking at the structure from the top, the outer rim almost disappears as its shape is created by the intersections of the inner rim. After all that, you might notice that this graph is only one color. That is due to the fact that a Tait coloring of this graph cannot be easily drawn using the loop that I have written. The current loop essentially draws a 3 edge chunk n times, each time rotated by 360/n degrees. Since simply coloring each edge a different color and rotating that does not result in a valid coloring, several logic statements are needed to actually realize a Tait coloring on this graph. This code can currently draw any GP(n, k). I am not sure that a Tait coloring on any distinct GP(n, k)  can be drawn in the same way.

For most of the embeddings I work with this semester, I am using a simple module in OpenSCAD called rod_rounded_ends to draw the edges and vertices of a given graph. This approach only allows for straight edge embeddings of graphs. In general this will be of interest to me as I continue to look into panelled and flat graphs and their properties.

Thank you for reading! Keep checking back for more interesting graphs!

-Ben Flint


F Castagna, G Prins
Every generalized Petersen graph has a Tait coloring
Pacific J. Math., 40 (1972), pp. 53-58

Student Post: Printing Printers

One thing I love about 3D printing is the sheer endlessness of it. There is always something new to print, and if there isn’t then you aren’t trying hard enough. I think that one defining feature of this field is the ability of the tool to improve itself. A 3D printer is not limited by how the factory set it up, or how the manufacturer designed it. Considering that some of the largest 3D printing communities are built around open source kits, it is not a surprise that there numerous mods for practically every 3D printer on the market. In almost every community guide to a 3D printer there will be a section about mods that can improve basically every part of the experience and end product. The amazing thing about these mods is that they can be created using the 3D printer that they are designed to enhance.

We happen to have a Flash Forge Creator Pro 2016 edition (FFCP), and a quick search on thingiverse returns numerous models to get started improving it. At home I have a Monoprice Select Mini v2 (MPSM) and some of the first things I printed on it were parts to improve it. In this post I want to show you a few of the parts I have printed as direct enhancements to both of these printers.

First lets look at the FFCP. DrLex on thingiverse has several designs for additions to the FFCP that are really nice. I have printed two of them for our printer. Two major problems with this printer are: the way that the filament feeds off of the spools, and the spool holders themselves. The filament is forced flush with the back of the printer when going through the normal feeding tubes, and this causes it to be stretched across the whole spool. So the first part I printed is and extension that holds the feeding tubes out from the back of the printer so the filament can feed off the center of the spools. In this photo you can see the new extension near the top printed in red. The pink circle is highlighting the old point where the feeding tubes started, and as you can see it was not ideal.FFCP_filament_guide

The spool holders themselves are also problematic on the FFCP. They allow for quite wide spools and if a thinner spool is used havoc may ensue. The spools tend to shift away from the back of the printer and the filament can get tangled behind the spool and cause all sorts of issues. This may have partly been due to the pool feeding location, but it is not worth risking damage to the printer to find out. To solve this issue I printed adjustable spool holders. These can be tightened to fit different width spools.

This slideshow requires JavaScript.

For my MPSM at home I have printed three different upgrades. This printer also does not feed filament in an optimal way, but a small guide helps to alleviate undue stress on the extruder. I also printed a new main control knob because the one that comes on the printer is lacking and a little bit ugly. Finally I printed a fan cover for the hot end cooling fan so that I don’t accidentally catch the fan blades when it is running.

In conclusion, 3D printers are awesome because you don’t have to buy extra parts to upgrade them, you can just print them. I think this is extremely cool.

Thanks for Reading. — Quincy

P.S. Here is a sneak peek at another project I am working on for the semester. Spoiler Alert: 3D scanning is really cool too.