Beautiful Functions in SketchUp (Ruby Snippet)
A wave of scaled boxes
Scripting geometry (as described in Chapter 7) can make things look very interesting (and quite beautiful) with a rather small amount of actual code. You can see this in the patterned panel example or in the pulled brick post. Both of those examples use a combination of sine and cosine functions to create a "wavy" pattern that nicely undulates shapes and geometry. There are other functions, however, some of which you likely remember from algebra and trigonometry classes. But even without delving too deeply into this, I thought it would be useful to have a reference for some interesting functions that may be of use.
TIP:Want to use this without coding? This script is also in one of the tools of my Scale By Tools extension.
The interactive examples shown below use the following grid of 1 inch cubes in SketchUp that were simply scaled vertically according to the lines of code that are included at the bottom...