Wednesday, August 8, 2012


Little Richard Penniman ... sure liked to ball ... Johnny Winter did an interesting version also.  The scroll bar (aka "slider") is one of the themes of this post.  That's my excuse. 

This is all Excel.  We can look at pushing back into Revit another time.  I want to explore the "diagonal ripple" that features as an animated GIF at the end of my last post.

Basically we have 2 arrays of 10x10 cells each.  Let's call the all-white array on the right "input" & the coloured array on the left "effect".  The values in "input" control the values in "effect".  So by messing around with "input" we can create different "effects".

The input array is very simple.  It is controlled by cell M1 at the top left.  As you move to the right along the top row, each cell adds one to the previous cell.  As you move down the rows, each cell adds one to the cell above.  This is very quickly created by typing the formula "M1 + 1" into cell M2, highlighting these first 2 cells, and dragging the little square in the bottom corner all the way to the right.

This technique of setting up a relationship between 2 cells then propagating it by dragging the corner of a selection is a very powerful feature of Excel.  If you are not already familiar with it, you should stop right now and practice using it.

So we have an array of numbers that is gradually increasing in size, diagonally from the top left to the bottom right.  Then we set up a slider to control the first cell.  The slider will step us through the integers from 1 to 10, and the effect will ripple down diagonally through the whole array. 

To create a slider, you need to go to "options" then "customise ribbon" and activate the "developer" tab.  This will create a new tab on your ribbon. 

Insert a scroll bar.  Stretch it to size.  Right click and choose "format contol" to open the settings dialogue.  You may have to right click several times.

Let's summarize what we have.  There are two arrays.  "Input" is controlled by the yellow cell at top left which pushes out a diagonal gradient.  Each of these cells then picks up the angle in the yellow box at the bottom and combines it via a sine formula to the equivalent cell in "effects".  The sine formula will convert a continuously rising sequence of numbers into a cycle (= a wave)  Instead of going from 1 to infinity, the numbers are now cycling between a minimum of zero and a maximum of one.

We can call it a cycle because a sine wave is the shape that a spot on the rim of a wheel traces as the wheel rolls along at constant speed.  I'm sure most of you are familiar with all this.  By the way, all these graphs are generated directly in Excel

The formula works like this.  (By the way I am a beginner at this stuff, so there may well be a simpler solution)  Take an angle in degrees, change it to radians, find the sine, convert negative values to positive.   The angle in degrees is found by multiplying the values in 2 cells.  One is a fixed location and is set to 18, the other location is relative so that the two arrays are mapped to each other.  One row of cells takes us through an angle of 180 degrees in 10 equal steps

Actually this doesn't result in a sine wave, it creates a series of camel humps.  This may be what you want, but if not, then you could simply add one to the sine values instead of converting negative to positive.  This would push the entire sine wave up into the positive side of the graph.  We don't want negative values, simply because most Revit parameters will break if you try to make them negative.  You are asking a dimension to turn itself inside out.  Doesn't work.

This is just a record of a couple of hours I spent playing with Excel, trying to build up my skill level.  I think that the ability to create oscillating cycles from a linear sequence will be very valuable.  I am certain that the ability to control a large array from two or three values place into key cells is critical.  We want to be able to generate complex patterns by manipulating a small number of simple variables.  The slider bar is very powerful tool for viewing a series of design iterations very quickly.

To summarise, I have been exploring 3 ideas

 Sine wave formulae
 Isolating key variables
 Slider bars

Go forth & multiply

But first have a look at these gifs.  Both created with old-fashioned curtain walls, some use of formulas, no Excel needed.  In both cases there is a type parameter in the curtain panel that is incremented step by step to create a series of images, which are exported one by one.  Use an image editor to compile these into a GIF.   First one uses a rotation parameter and basically a recreation of one from HERE. (just to prove that it can be done with a standard curtain wall) 

Second one uses a thickness parameter and a Revit version of the Sine wave formula (no need to convert angles to Radians in Revit)

By the way, the rotating curtain panel makes use of Marcello's void rotation method: another little gem from RTC 2012.


  1. Wow, right after I post on my blog about using a standard curtain wall system I check yours and notice you posted about the same thing, and we both used Marcellos rotation method, great minds think alike I guess.

  2. Thanks Ryan

    Looks that way. It was a great opportunity to test out this method, and you need to try it out to see how clever & subtle it really is



I've been getting a lot of spam so had to tighten up comments permissions. Sorry for any inconvenience. I do like to hear from real people