###### Updated

11/12/2018###### Released

10/22/2018###### Skill Level **Appropriate for all**

###### Duration

###### Views

- [Scott] Hi, Scott Onstott, here. I've always been kind of a math geek myself, but whether or not you like math or not, I think we can probably all agree that there are certain forms that are very beautiful, and wouldn't it be great if we could get those into SketchUp? And it turns out, there's a very easy way to do that. Here I am using wolfram alpha, which is a search engine that scientists and mathematicians often use, and I'm just typing in different forms that I'm aware of that are beautiful.

Here's a logarithmic spiral. I think you'll agree it has a pleasing form. We can get that into SketchUp using a plugin that I found. Before I show you the plugin, though, let's take a look at some other forms. The catenary is also another interesting form. The reason for this is, this is the way that things hang under the influence of gravity, so for example, this curve here would be a good cable on a suspension bridge, or it would represent the cross section of a piece of fabric hanging between two fixed supports.

If we turn it upside down, imagine turning this curve upside down, you would have an archway. In fact, the Saint Louis arch is a modified catenary curve, and one of the advantages of the catenary curve is that the arch doesn't have any outward thrust, so it doesn't need to be supported like all other arches do. The cycloid is another interesting form, and I think this would make a really nice archway. It would require support, by an adjacent arch, for example.

In all of these cases, Wolfram Alpha gives us the parametric equations that generate these mathematical forms. It turns out, there's a Ruby script that you can download for free that allows you to input parametric equations and create surfaces and curves in SketchUp. If you go to this URL and scroll to the bottom of the list, there is a Ruby script here by Jim Hamilton, who has kindly created this functionality for SketchUp.

You can download the U-V PolyGen and then go into SketchUp, go into the extension manager, install that extension, and what I like to do is, make SketchUp take up about half the screen, and then I'll have my browser take up the other half, so that I can see the equations down here that I need to input, then I'll go back to SketchUp and run this from the extensions menu.

The way that this works is it has two parameters, U and V, and we're only gonna take advantage of the U parameter. I'm gonna set U start to minus 10, let's say U ends at 10, and we'll say U steps is 100. I don't need to use V here, so I'll just set this to zero, zero, and one. I'm gonna clear out the values here in x, y, and z. I'm not going to use z at all so I'll set that to zero.

We do need to enter the equations of x and y here, and these correspond to the equations over here. The only difference is that instead of using the variable t, we will be using the parameter U. So, we need to mentally substitute U for t, and over here, this is the equation, and the way that we read this is a and b are constant factors, and they're shown up here in these different examples. I'd like to make this spiral right here, so a is one and b is 0.2, so down here, we need to enter this equation.

e is Euler's constant, and we can't just type in e here, it doesn't understand that, so we have to use an approximation, so here's how you do that. I'll open parenthesis and type 2.718. That's an approximation for Euler's constant, e, and then I'm going to raise this to the power of, so I'm going to type asterisk, asterisk, and then open parenthesis, this will be 0.2 times U, and I'll close two parenthesis.

So far, so good, now we need to multiply this times the cosine of U, and the way that you do that is you type in math dot cosine of U, just like that. I'm going to highlight all of this, I'll press Command + A, or Control + A in Windows to select all, and then I'll copy that to the clipboard, go down here and paste it, and the difference down here on this one is that we use the sine rather than the cosine, so I'll just back up here, type in sine there, you can see that, otherwise they're identical.

I'll click okay, and then zoom extends, and there we have it. To make this an interesting three-dimensional form, we can do this, we can select it, rotate it around the origin point, make a copy by pressing the option key on a Mac or the control key on Windows, go into copy mode. Now, we have two different grouped spirals, so what I'm going to do is shift select them and right click and explode them both.

Zoom in here, and it looks like they're overlapping in different ways here, so maybe what I'll do is just erase that, and then over here, I'll connect the dots, and that generates a surface, and I'll use push pull and pull that up. Finally, I will select all by triple clicking, then right click and soften and smooth the edges. I'll just drag this up until they smooth out, and I'll group the result, so there's a beautiful form that we really couldn't make in any other way.

I'll move this over. Moving on, let's make a catenary next. This is a little bit easier, actually. I'll go back over here, run U-V PolyGen again, let's clear out these equations and type in the values. Remember, t is gonna be U, so we'll just type in U for x, and then over here, this has a constant factor, you can see the different results up here.

Let's use 0.5, 0.5 times the hyperbolic cosine, and the way that you type that in is math.cosh, and then we're gonna have that equal to U over some value, let's say it's 0.5, and then okay. See what that looks like. It looks like it's really, really, long, something's wrong with it, let's erase that.

We have to make an adjustment, I'll go back and do it again. This time, instead of dividing by half, let's divide by three, see how that looks, okay, and that's much better, so you can make adjustments. Each time you go back, thankfully, the values remain, so you can just make adjustments, here. Let's say it doesn't have 0.5 in the front, what does that look like? Oh, it's taller, okay, I'll make another one, let's say divide by four, what does that look like? Okay, so we have different varieties of catenaries that we can generate just by varying those numbers.

I'll erase these two, I kinda like this one best. I'll go ahead and rotate that by dragging from the origin, I'll rotate that up, and I'll double click over here to open the group. I'll double click on the curve to select all the segments, and then offset that, and then I'll draw in a line here connecting the dots. Another line on the other side to generate a surface, I'll push that out, triple click to select all, right click, soften and smooth edges, and just move the slider a little bit.

We have another beautiful form. This would represent a piece of fabric hanging from two thick supports. Let's do the final shape here, the cycloid. I'll go back and do that again. I'll clear out these two values, here. So, x is going to be this constant factor, a, which I'm just going to say is one, so we'll ignore that, so then our equation just becomes U minus sine U, so U minus sine U, and then down here, this equation is one minus cosine U.

Let's see if that works, okay, it does, great. So, I think the easiest thing here would be to double click and erase everything except for one of these cycloids, okay. Then, I will rotate that up like I had done before. Double click to open the group, double click to select, triple click, rather, to select all connected, and then offset, and in this case, it's kind of interesting, the offset seems to work very well on the left, but not so well on the right, that's no problem, 'cause what I can do is divide this in half.

I'll draw a line down here. I'm gonna go ahead and erase all that. Draw a line over here generating a surface, which I could then push pull back. I'll triple click and then right click, soften and smooth it, I'll make a copy of this, and then use scale, and I'll scale it around the midpoint by holding down the option key on the Mac or the control key in Windows until it scales to a factor of minus one.

This effectively mirrors the object, and I'll come back over here and connect it. Finally, I'll use the eraser tool and I'll hold down the option key on Mac or the control key on Windows, have to be inside the group, and that will smooth those edges. There we go. So, we have another beautiful form that's only possible through mathematics and through this great plugin, U-V PolyGen.

## Share this video

## Embed this video

Video: Use math to model precise forms