Image by Paula R Lively on Flickr
Create the American flag in SketchUp using this detailed tutorial.
SketchUp is a free and fun program for 3D modeling. You can use SketchUp to design just about anything, from furniture to a dream bedroom to an entire city.
There is a downloadable version called SketchUp Make, which you can get here. But there is also a web-based version which works right in your Internet browser. This version is called my.sketchup, and to use it just go to www.my.sketchup.com.
Even though this project is a little late for July 4, it’s never too late to honor our country’s flag. And it’s a great brain exercise as well, planning how to draw something out, based on measurements. (If you’re not in the US, or want to create another flag, the techniques used in this project can be applied to any other flag.)
I found this schematic diagram of the US flag on the website http://www.usflag.org/flagspecs.html. The dimensions are proportional, not associated with any particular unit.
We’ll make our flag rectangle 1 meter high and 1.9 meters wide. This means that the other measurements can be read in meters as well, since we’re using a base of 1 meter for the height.
After you go to the SketchUp page and launch your modeling session, here’s what you should see: a man (Josh) standing on the ground with axis lines around him. The red and green axes are on the ground, blue is for the vertical direction.
We don’t want Josh standing on our flag, so click the Eraser icon or press the E shortcut key. Click on any edge of Josh to erase him.
Since the flag will be drawn on the “ground,” we need to switch to a bird’s eye view – looking down on the ground from above. On the right side of the window, click the Views icon.
Click the icon that looks like the top of a house.
This is the view you should see now: looking straight down onto the red – green plane.
The next step is to set our unit of measure to meters. Click the Model Info icon from the tools on the right side.
Then click the unit listed in meters. And because some of the measurements listed on the diagrams have three decimal places, click 0.000 under Precision.
Activate Rectangle, either by finding it in the Rectangle flyout, or by pressing the R key.
Click two corner points to make a rectangle which is wider than it is high. Don’t worry about the exact size. The dimensions are listed in the lower right corner.
To set the correct dimensions, type Type 1.9,1 (width, then comma, then height). These numbers replace what’s in the Dimensions field, but you never need to actually click in this field. Just type the numbers and press Enter.
Next, we’ll mark off the corner rectangle that contains the stars. Activate the Tape Measure tool.
This tool can be used for a few different things, but we’ll use it to create guide lines. Click anywhere along the left edge of the rectangle (don’t click on a corner point).
Move the cursor to the right, and a guide line is attached to the cursor, parallel to the edge you clicked. The length between the guide line and the left edge is listed next to your cursor. You can click to place the guide line, or don’t click. Either way, the correct length will be set in the next step.
According to the diagram, the width of the rectangle with the stars is 0.76. So type .76, which appears in the Length field, and press Enter.
Here’s where the guide line ends up:
The bottom edge of this rectangle is along one of the stripes, so now we’ll draw the stripes. There are 13 horizontal stripes (for the 13 colonies, of course). The stripe width is listed in the diagram as 0.0769, which is 1 divided by 13. But we don’t actually need to use this number. Instead we’ll simply divide the flag height into 13 equal stripes.
To do this, we’ll copy the top edge onto the bottom edge, then divide the copy distance. Start by activating the Select tool: press the Spacebar. Click the top edge to select it.
Copying is done with the Move tool, so press M. Then press the Ctrl key (PC), or Option (Mac). You don’t have to keep this key pressed, just tap it. The cursor now has a “plus” sign next to it, which means the selected edge will be copied, not moved.
For the copy start point, click either corner at the top of the rectangle.
For the copy end point, click the bottom rectangle corner directly below where you clicked before. This establishes the distance that will be divided into 13.
Type 13/ (include the slash symbol after the 13), and press Enter.
Now the flag is divided vertically into 13 stripes.
Now we can finish the rectangle that will contain the stars. Activate the Line tool (press L), and trace along the guide line. Start at the top, and end when the line passes through seven stripes.
Then use the Eraser to remove the lines inside the rectangle, and erase the guide line as well.
The stripes are finished, so they can be painted. Click the Materials icon.
Click the magnifying glass icon to open the material collections, then open Colors.
Find the red and white colors, and paint alternating stripes, starting and ending with red.
Now comes the fun part: the 50 stars. Here’s the plan: First, we’ll create a grid to mark where the stars will be placed. Next we’ll create one temporary star component, and place copies at the correct grid points. Finally, we’ll edit the component to actually look like a star.
Look at the diagram of the star rectangle. In the horizontal direction, this rectangle is divided into widths of G and H, which are equal lengths. There are 12 of these lengths, so the rectangle width must be divided into 12 segments. And in the vertical direction, E and F are equal, and there are 10 of these lengths. So the rectangle height must be divided into 10 segments.
We’ll use guide lines to create this grid. Activate the Tape Measure again. This time, instead of creating a guide line parallel to an edge, we’ll create one along an edge. Click two points (not endpoints) anywhere along the length of the left edge, to create the guide line along it.
We’ll copy this guide line, so activate Select and click the guide line.
Use the Move tool with the Ctrl / Option key to copy the guide line from the left side of the rectangle to the right.
Type 12/ and press Enter, to divide the rectangle horizontally into 12 spaces.
Use the same steps to divide the rectangle vertically: draw a guide line along the top, copy it to the bottom of the rectangle, and enter 10/.
To start the first star, zoom into the spot where the first set of guide lines meet.
Activate the Polygon tool, which is one of the tools in the Rectangle flyout.
By default, this tool creates hexagons which have six sides. To change to a pentagon (five sides for a five-pointed star), type 5 and press Enter.
For the center of the pentagon, click the guide line intersection point. Then move the cursor straight down and click again. The size of the pentagon doesn’t matter, since we’ll fix it in the next step.
According to the diagram, the diameter of each star is dimension K = 0.0616. But in SketchUp, you can change a polygon’s radius, not diameter. So type 0.0308 (half the diameter), which appears in the Radius field, and press Enter. The correctly-sized pentagon looks like this:
We’ll keep the pentagon for now, and make it into a component. This means we can make copies of the pentagon component in all the right places, and then change all of the pentagons into stars at once.
First we need to select what’s in the component. So activate Select and double-click inside the pentagon. This selects both the pentagon face and its edges.
Right-click on the pentagon and choose Make Component.
Enter any name you want for the component (“Star” works well), and click OK.
The pentagon now has a box surrounding it, which means it’s a component and it’s selected. It now needs to be copied, so leave it selected.
To make the first copy, use Move with Ctrl / Option. For the copy distance, click any intersection point then click the intersection point two grid squares to the right.
We want six stars along the top row, so type 5x (which means five copies) and press Enter.
The next row will have five stars. So activate Select and drag a selection window from left to right, which includes the first five stars in the row. (Or you could keep the Shift key pressed and click the five stars, one by one.
To copy these stars, click two move points in a diagonal direction.
To make the rest of the rows, copy all of the pentagons we’ve made so far. Then copy them straight down, like this:
Type 3x, to get three copies, and press Enter.
Only the bottom row still needs to be filled. So select any row of six stars, and copy them into place.
Now we can erase all of the guide lines.
Now that we have all of our pentagons placed correctly, we can change each pentagon into a star. Right-click on any pentagon and choose Edit Component.
The pentagon you’re editing appears surrounded by a dotted-line box, and everything else is faded in the background. Activate the Line tool and draw lines inside the pentagon to form the star. The same lines will appear on all of the other pentagons as well.
To clean up the star, activate the Eraser and erase the edges of the pentagon, as well as the edges inside the star.
Then paint the star white. You won’t be able to see the color change since it looks white while editing.
When the star is finished, right-click anywhere outside the star and choose Close Component.
As long as the stars remain components, you won’t be able to see them in a different color than the color of the rectangle. So the stars should all be exploded. To select them all, activate Select and draw a left-to-right selection window that includes them all.
Right-click on anything that’s selected, and choose Explode.
Now the white color of the stars shows through.
Just one more step – paint the rest of the rectangle blue. Old Glory!
10 SketchUp Tips Every Modeler Should Know
Also In The October 2018 Issue
Create a fun adventure game with sprites using a retro fantasy computer.
Hide information in plain sight using a clever code and a good book.
Logic puzzles help develop reasoning skills useful for programming, computer science, and anything you might do.
Find perfect and fun gifts for your loved ones that teach STEAM concepts and skills.
From light-up bow-ties to conductive thread, you’ll be the life of the party with this STEAM-inspired gear.
A free online test service reveals how much personal data your web browser is giving away.
Add more tools to your command line arsenal, including running mini-scripts and making backup copies.
Use switches to take your robotic creations to the next level.
Create the American flag in SketchUp using this detailed tutorial.
From lasers to supernovas, Berboucha is making science communication a priority.
Code can always be improved. Check out these tips to make you the best programmer you can be!
It’s a programming language unlike any you’ve seen before. Check out this symbolic system designed for mathematical calculations.
It’s a game that’s obsessing the world. Harmful, or a potential gateway to new skills?
Some fun Python code that introduces you to the arcane world of event handling.
New, improved, faster, and sleeker - it’s Scratch 3, your new favourite block language!
Learn about the brilliant algorithm behind all of your GPS devices.
It’s free, comprehensive, and available on-the-go. This cool app helps you master Python faster than ever before.
Open up whole new worlds to explore through these interesting, diverse add-ons.
Links from the bottom of all the October 2018 articles, collected in one place for you to print, share, or bookmark.
Interesting stories about computer science, software programming, and technology for October 2018.