Teaching Coding, Conclusion

The Harpeth Hall Hackers spent two more days learning how to develop Android Apps. We worked on a “PaintPot” app that allowed the user to take a picture and draw over it. The girls did a good job coming up with modifications to the basic app. Here’s a screenshot of it:

PainPot1

And here is the code for it:

PaintPotCode

The next project we did was to create a game based on the old Whack-a-Mole arcade game:

MoleMash

The AppInventor website has step-by-step instructions and tutorials on how to create both of these apps.

We wrapped up the course spending a couple of days designing and printing 3D objects. We used TinkerCAD to do the designing, and a MakerBot Replicator 2 to print the projects. The girls designed a coin tray, a ring, a fish, a turtle, and a monogram desk display:

Printing the Projects

Printing the Projects

Finished Projects

Finished Projects

Some quick thoughts, now that the minicourse is finished:

1. Beginning with Scratch worked really well; I think next year I will go straight from that into AppInventor, since they are so similar.

2. The girls were surprisingly willing to tackle pure coding with Python. Even though that part of the course wasn’t their favorite, they made a sincere effort to learn it.

3. TinkerCAD has a Shape Generator feature that is coded with Javascript. I might want to consider teaching them a little of that language, so they can customize their 3D projects.

4. I intended to introduce the students to Codecademy, but we just didn’t have enough time. Maybe next year!

Advertisements

Using 3D Printing for Math Manipulatives

In a couple of earlier posts (here and here), I wrote about how my school has acquired a couple of MakerBot Replicator2 3D printers. The students are getting very excited about using them. One of my Honors Precalculus students even designed and printed a “Menurkey” – a combination Menorah and turkey – because Hanukkah and Thanksgiving coincide this year. Here’s a picture of the small prototype she printed first:

Menurkey

Thingiverse recently had a competition for the best math manipulative, and there were some really useful entries. I especially liked a conic section one designed by Karl Crosby. We have purchased some different colored plastic, so I went with green this time:

Conics

Next, I printed it out in two stages, so I could use two different colors of plastic. It turned out really well!

Conics1 Conics2

These are great for showing students how slicing a cone at various angles results in a circle, an ellipse, a parabola, or half a hyperbola. Until now, all the math teachers in my department shared a wooden one that was very expensive. Now I can print out a classroom set for almost nothing.

Success in 3D!

In my last post, I mentioned that my next goal with our 3D printers was to build an object from scratch. The first CAD program I tried was FreeCAD, which is very powerful for an open source product. However, it is about as non-intuitive as any software I’ve ever attempted to learn. I watched a few tutorials on YouTube, and I was able to make a couple of very simple objects, but it is not something my students will have the patience to learn. The next one I looked at was Wings 3D, but it wasn’t suitable for the same reasons.

The third time’s the charm, though, and I settled on TinkerCad, an online CAD program. After I set up my free account, it immediately offered me a very short lesson where I learned how to move objects around on the workplane. After 8 of these brief (and fun) lessons, I was very comfortable with the basic features of the software. Best of all, it is something that my students will be able to learn and use in less than an hour.

I decided to make a compact disc display stand. Using TinkerCAD, I was able to design one in about 45 minutes:

Tinker1

You can specify dimensions to the nearest 0.1 millimeter, so I was interested in seeing how accurately our printer could reproduce the design. TinkerCAD saves your projects on their site, but it also provides you with several options for printing and uploading:

Tinker3

I chose “Download for 3D Printing”, and this dialog popped up:

Tinker4

I saved my design as an .stl file, which is what MakerWare uses to slice the object. It took our MakerBot Replicator2 about 1 hour, 45 minutes to print my CD display stand. Here it is hard at work:

Here is the final result; all the dimensions match the design’s specifications exactly:

CD Stand1

And here it is in action, proudly displaying one of my favorite albums by one of my favorite groups, Big Big Train!

CD Stand2

Things I’ve learned so far: always print your object with a “raft” – a temporary base the printer lays down on the printing plate. When the build is completed, pop your object off the raft, then peel the raft off the printing plate.

Update: I designed a little stand for my iPod Nano:

standDesign

 

Here is the printed version:

iPod Stand

 

Here it is, valiantly supporting my iPod:

iPod Stand3

 

Mr. La Forge, Could You Take a Look at Our Replicator?

MakerBot2

If you recognize the reference in this post’s title, then you might be a Star Trek: Next Generation fan! The big news at my school this week has been the unpacking and setting up of two MakerBot Replicator2 3D printers. They’re not quite comparable to the Enterprise’s replicators (they don’t make tea, Earl Grey, hot), but they are still amazing.

The setup process was surprisingly easy (well, it helped that our incredibly talented tech-wizard, Allen Karns, had already figured all the steps!). The MakerBot guided us through every step of the setup, including leveling the printing plate. We’ve already printed out the sample files that come with it, and the response from my students has been terrific – they are already eager to start printing out three-dimensional function plots!

For my initial project, I went to Thingiverse and browsed through the hundreds of files available for download. Of course, I decided to be ambitious, and settled on a Voronoi-patterned Klein Bottle:

Voronoi_Klein_Bottle_preview_featured

We loaded the file into the MakerWare program that comes with the printer, hit “Print”, and it was off and running. The concept behind 3D printing is elegantly simple. Once you have a three-dimensional CAD file of the object you want to create (there are lots of options for this: Sketchup, FreeCad, etc.), you load it into MakerWare. MakerWare “slices” your design into thousands of layers that the printer will use to build up your object. Think of a stack of pancakes that are each 0.2 mm thick, and you get the idea. If you are a little apprehensive about creating your own CAD file, the aforementioned Thingiverse website is a wonderful resource, full of ready-to-use files.

What does the printer use to stack up those layers? Plastic. There is a nozzle that heats up to 230 degrees Celsius, and it runs plastic filament (basically grass trimmer wire) through it, which melts and is deposited layer by layer until your object is done.  Here’s short video of it hard at work:

Unfortunately, I was a little too ambitious with my first attempt, and it wasn’t able to complete the construction of the Klein Bottle:

Printer Fail

But, you learn from your mistakes, and here’s my advice when you are just starting out in 3D printing: pick a project with a wide, stable, base that either rises vertically or tapers inward, like a pyramid. Otherwise you need to instruct the MakerBot to construct supports to hold up the object as it’s being fabricated. Also, I would recommend you pick a fairly solid object to build; you’ll notice that mine is inherently weak due to the large amount of empty space.

Nevertheless, I’ve caught the 3D printing bug, and I’m planning on trying another project first thing tomorrow. Eventually, I plan to incorporate the printer into my calculus course; I envision using it to create real-life models of rotated solids. I’m also hoping to use it to print out actual models of fractals I’ve made using Chaoscope, like this one:

Icon1

The ability to translate fractals from a 2D computer screen to a 3D object is a dream come true!

Update: I downloaded a much simpler object file to print, and it worked beautifully:

Rotated Shape

I’ve also learned that the printing plate needs to be leveled every time you print a project.

Next step: design my own object from scratch, and print it out!