From the course: Deke's Techniques (2018-2021)

923 Creating a beveled, equilateral triangle

From the course: Deke's Techniques (2018-2021)

923 Creating a beveled, equilateral triangle

- Hey gang, this is Deke McClelland. Welcome to Deke's Techniques. This week, we'll take a plain old equilateral triangle here inside Illustrator, and we'll turn it into this classic Mercedes-like star, which is perhaps a little more complicated than it may at first appear. Here, let me show you exactly how it works. All right, here's the final version of the artwork open inside Illustrator, and based on nothing more than an equilateral triangle. But before I show you how to do that, I want to show you what's going on under the hood. And so I'll go ahead and switch to this guy here, which is an equilateral triangle, that is to say each one of the sides is the very same length. And it happens to have a height, which is indicated by a lowercase h, of 300 points. And you can confirm that's the case, if you like, by first going to the View menu and confirming that your smart guides are turned on, and then go ahead and select the line segment tool. And don't drag directly inside the center. In fact, I can't drag at all, because I'm working on a hidden layer. So I'll go ahead and select the triangle layer here inside the Layers panel. And then, what I was going to say is, don't just drag across the middle, because you'll probably snap into alignment with this arrowhead down here. Instead, start over to the side a little bit, right about there should be good, and then drag straight down like so. And you should see, especially if you press and hold the Shift key to constrain the angle of your drag to exactly vertical, you should see a D value, that is a distance value, of 300 points. All right. In addition to the height, you might want to know exactly how long each one of the sides is. After all, you might be trying to match the bottom side, for example, to some other shape, in which case there's a little bit of math involved. I'll go ahead and turn on this side layer here. Don't let this scare you. The side, as indicated by a, and that's because each one of the sides is the same length, is equal in this case to 346.41 points. Well, how in the world do we know that? Well, of course you could draw with your line tool if you wanted to, but here's the equation. a equals two times h, the height value, that is, divided, and this is the only screwy part, by the square root of three, which is why I'm showing you that the square root of three is approximately equal to, not exactly, it goes on and on, but it's approximately equal to 1.732. And so if you wanted to draw a line of that length, you could very easily do so just by clicking any old place with the line segment tool, in order to bring up this dialog box here. I'm going to change the angle to zero degrees cause we want the line to be exactly horizontal. And then I'll take that length value, which is currently set to the height of 300 points. I'll click after it, and I'll multiply it times two by entering asterisk two, and then I'll press the Tab key in order to update that value, and we have 600 points. And so that takes care of the 2h part of it. Now what you want to do is click after that value again and enter slash 1.732, like so, which is this value right down there. At which point, if you press the Tab key, you will end up with a length of 346.42 points, so a hundredth of a point longer than this guy actually is, but that's close enough. At which point I'll click Okay to create that line. And you can now see, if I press the V key to switch back to my black arrow tool, I can grab this guy and drag it down here in order to snap it into alignment. And as you can see, it takes up the entire width of the bottom of that triangle. All right, here's the thing, though. I'm just going to go ahead and select the polygon tool from the shape tool flyout menu, and I'll just click any old place in order to bring up the polygon dialog box. Notice that I've taken the sides value down to three, which is the lowest value that this dialogue box will allow. And that's going to give you an equilateral triangle. But what in the world is with this radius value? It doesn't match the height value or the length of any one of the sides. Instead it represents a circle. And to see what that circle looks like, I'll go ahead and cancel out of here, and then I'll turn on this circles layer, which is when things become very interesting indeed. Notice that we have two circles. The incircle, which I've represented in yellow, and the circumcircle, which I've represented in red. The incircle is contained entirely within the confines of the equilateral triangle. It has a radius, so half the diameter, of 100 points. And we know that because to figure out this incircle radius, which is represented by a lowercase r, we take the height and divide it by three. And so the radius of this little circle is 100 points. It therefore has a diameter of twice that, which is 200 points. The thing we're actually interested in, at least where Illustrator is concerned, is the circumcircle, which is represented by an upper case R, and it is equal to two times the height value, so 600 points in our case, divided by three. And so we end up with a radius of 200 points. And if you were interested in the diameter, therefore that would be two times 200 or 400 points. All right, so what? Well, let me show you. I'll go ahead and switch over to this document from last week, and I will press the V key to switch to the black arrow tool. And I'm going to select a few lines here. I'm going to go ahead and marquee this top guy right here, this little line that's going straight up, and then I'll Shift + click on this guy that's going down and to the left, and then I'll Shift + click on this one that's going down and to the right. And I'll go ahead and copy them, just by going up to the Edit menu and choosing the Copy command. Or of course you could press Control + C, or Command + C on the Mac. All right, now I'm going to to turn off the shapes layer and I'm going to create a new layer, here inside the Layers panel, by dropping down to the little plus icon. In earlier versions of the software, it's going to be a little page icon. Then you want to Alt or Option + click on it to force the display of the layer options dialog box. So you can take a moment to name the layer, triangle, I would gather, and then I'll change the color to my favorite, gold, and I'll click Okay in order to create that new layer. And now I'll zoom in by pressing Control + plus or Command + plus on the Mac. Now you want to go ahead and grab that polygon tool, once again, from the shape tool flyout menu. Recall that the tool creates a shape automatically from the center outward. So I'll position my cursor at the intersection of those two guidelines, and I'll click to force the display of the polygon dialog box. Again, this is a triangle, so we're looking for three sides. And because I want the height of my triangle to be 300 points, I want the radius therefore to be 200 points. But if you like, you can enter that formula, which is 2h divided by three. So you would take the desired h value, 300 points, and multiply it times two. Now you can't do multiple equations in a row. So press the tab key to update that value and then click after it again, and now we're going to divide it by three by entering slash three and pressing the Tab key. And that gives us the desired radius value of 200 points. At which point I will click Okay in order to create that shape. All right, now I just want to confirm that everything I've told you is true. So I'll go ahead and grab my line segment tool, and I will drag down from the top right here until I arrive all the way at the bottom of the shape. And notice the D value, distance, is 300 points. So in other words, this triangle is 300 points tall. Another thing to know about it, I'll go ahead and press the Backspace or Delete key to get rid of that line. Notice if I drag all the way to the center, as indicated by the intersection of those center guides, that I have a D value, a distance value, of 200 points. And then, if I go all the way to the bottom, I've got another 100 points. So now we're looking at 300 points in all, I want to make that perfectly clear. So I'll go ahead and delete that again. If I were to drag from the center, as indicated by the intersection of those center guides, to any anchor point, I'm going to see a D value of 200 points. However, if I drag from the center to the center of any one of the sides, I will see a D value, if I get it right here, and you should watch for the word Intersect there, I'll see a D value of 100 points. So if you want to go from the center to an anchor point, that's 200 points. If you want to go from the center of the shape to the center of any one of the sides, it's going to be 100 points. All right, I'm going to undo those lines by pressing Control + Z, or Command + Z on the Mac, a few times. And then I'll bring back those lines that I copied by going up to the Edit menu and choosing Paste in Front, or you have that keyboard shortcut of Control + F, or Command + F on the Mac. And the reason I'm bringing guys back is I want to break this shape up into three pieces. And so I'll press Control + A, or Command + A on the Mac, in order to select everything. And I'll go ahead and press Control + Plus, or Command + Plus on the Mac, to zoom in on that selection. And then I'll grab the shape builder tool. You don't want the shaper tool. I think it's very confusing that these tools are so closely named. You want the shape builder tool right here. And then you just want to click inside this shape and click inside this one as well. And that'll break them all apart, as indicated by the fact that we have these miter joins, notice that, that are not lining up. And to fix those, you want to press Control + A, or Command + A on the Mac, in order to confirm that all the shapes are selected. And you don't want to go up to Stroke and change the corner at this point. Notice if I select Round Join it won't do anything. And that's because the shape builder tool is active. What I need to do is switch back to the selection tool, what I call the black arrow tool, and then click on the word Stroke up there in the horizontal control panel and select Round Join, and that will round things off. I also want to assign some gradient fills. And so I'm going to go up to the Window menu and choose the Gradient command to bring up the gradient panel. And I'll make sure the fill is active right there, notice that, and I'll click on a gradient slider in order to apply a default gradient. And then I'll make sure my swatches panel is open and I'll grab this kind of drab brown swatch right here, and I'll drag it and drop it onto the final colorstop, the one on the right hand side. And then I'll grab this bright shade of yellow and I'll drag it and drop it onto the white colorstop, the one on the left hand side. And I'll change the angle value right here to 90 degrees. And then I'll click out the shapes to de-select them. And I'll click on this guy in order to select it, independently of the other ones, and I'll change the angle value to zero degrees this time. And I'll go ahead and reverse the colors by clicking on this icon right here. And that will result in a more sculptural effect. All right, I'll go ahead and click off the shape to de-select it, switch to the stroke panel so I have a little more room for my layers panel, and I'll turn off the guides layer as well. And that's how you create a quick and dirty illustration that's exactly 300 points tall based on a 200 point radius here inside Illustrator. If you're a member of LinkedIn Learning, I have two, count them, two follow up movies. In the first one, we'll take this thing that we've made so far and turn it into something that very closely resembles a classic Mercedes star. In the second, we add a ring that shares a common radius value with the triangle we just got through creating to achieve this final, geometrically precise effect. Deke's Techniques, each and every week. Keep watching.

Contents