Fabrication Summer Camp: Day 3
Welcome to the third day of our summer camp! All the shapes we’ve made up till now been solid objects. But some objects have holes, like buttons, donuts, and things with eyes and mouths. Additionally, our only means of adding curved edges has been to superimpose circles onto other objects. This superimposing is not a good fit for fabrication. Each shape will be traced out by a laser or a cutting tool, and when shapes overlap, there will be cuts on the inside of our object. Today we’re going to examine a new shape command that lets us add holes and curved edges without introducing unwanted cuts.
Earlier we traced out a blocky letter. My first initial is C, and I ended up with a design that looked like this:
Those right angles are too raw and rough. Lettering that pleases the reader has curvature. I’d rather have a C that looked like this:
We will make this better C using the
path command. The
path command is more general than rectangles, polylines, and polygons. It allows for both straight lines and curved lines. To draw this C, we anchor ourselves on the bottom of the internal straight edge using the
go command and then draw a line straight upward with the
Next we need a curve. In particular, we need a circular arc. An arc is a portion of circle’s perimeter. In this case, the circle is centered at (50, 70) and the arc is just 180 degrees of it. That is all we need to tell the
To turn clockwise, we use a negative number of degrees.
We keep add lines and arcs to arrive at this shape:
If we’d rather see the filled object instead of its outline, we remove the stroke and add a color:
Our vinyl cutter doesn’t care. It will cut along the outer edge of the shape whether we use fill or stroke.
path command allows you to describe an arc in two ways:
centerproperties. Use this form when the arc orbits around something.
positionproperties. Use this form when the arc must end at a certain location.
In the letter C above, we used the
center property to make the inner and outer curves orbit around the same location. Sometimes reasoning about the center is difficult because the center isn’t actually part of the object. In such cases, the
position property might be easier to use. For example, I modeled this spaceship by thinking about where I wanted the arcs to end:
Use whichever form makes sense to you. Note that you can’t define both
center. In either form, you must define
Now it’s your turn to make an object with curved edges out of a
path. You challenge is create a fish, perhaps like this one:
Start by drawing on your graph paper. Identify the vertices between the curved edges. Show your drawing to a teacher. Then start coding it up in Twoville.
You may be familiar with a little yellow creature that eats pellets and runs away from ghosts. That creature is named Pac-Man. He was born in a Japanese arcade game in 1980. Pac-Man’s made mostly out of circles, which makes him a good candidate for modeling in Twoville. However, one of those circles is his eye, which is really just a hole. So far we haven’t seen a way to make holes in our shapes. That all changes with
To make a hole in an object defined as a path, we plot a new shape in front of an old one. Wherever the path overlaps with itself, a hole appears.
Consider this first attempt at plotting Pac-Man, which draws a circle with a wedge removed using the
Notice that this Pac-Man lacks an eye. We attach one by adding more pieces to the path. The easiest way is to use the
circle command inside the
Holes do not need to be circles. We could have used the
rectangle command. Or we can make any arbitrary shape using
arc. Here we make a triangular eye:
Before he looked hungry. Now he looks like he’s yawning.
Remember that time you plotted a letter for someone you cared about, but that someone’s letter couldn’t have a hole in it? Well, we’re not limited anymore. Think of someone that you care about that can be identified by a letter that has a whole in it. In English, those letters are A, B, D, O, P, Q, and R.
Draw the letter on graph paper, use the
path to trace its outer perimeter with all of its arcs and straight lines, and then trace out the perimeters of its holes. Identify its positions and sizes. Code it up and we’ll turn it into a sticker that you can give to the person you care about.
We’ve seen how the
path command allows us to add circular arcs to our shapes. Not all curves are simple circular arcs. A guitar pick, for example, doesn’t look very circular. Let’s examine how to model these other kinds of curves.
Suppose we have a starting position P. We want to connect P to position Q. A straight line would lead directly from on to the other, but we want a curve. To control the curvature, we add a third position that acts as a black hole that sucks the edge toward it. This third point is called a control point. As the control point moves farther from the edge, the curve gets bigger and bigger.
To see this in action, let’s model a leaf. We start with the stem, which is made of straight lines:
Now we jump to the tip, adding a control point to tug at the edge between the stem and the tip. We use the command
quadratic to describe this curve:
Now we mirror this same pattern to complete the other side of the leaf, closing out the path with the
A quadratic curve has a single control point tugging at the edge. To get even more control over the curvature, we can add two control points using the
These kinds of curves are called Bézier curves. They are named after Pierre Bézier, who invented them so that he could describe the shapes of cars.
We are going to have a shape jam. Your “theme” for today is to use paths and Bézier curves. Follow these steps in making your shape:
- Start by drawing on graph paper.
- Get your design inspected by a teacher to make sure it’s something we can fabricate.
- Mark the positions of the vertices and control points.
- Code up your shape in Twoville.
You will have about 30 minutes to make your design. Use that time to make something interesting that exercises your creativity and your brain. We’ll turn your creation into a vinyl sticker.