Thursday, April 23, 2009


Our first topic this semester is recursion. Here are some randomly collected notes about recursion:

  • Recursion is a way of thinking about and solving problems
  • one of the central ideas of computer science
  • Solving a problem using recursion means that the solution depends on solutions to smaller instances of the same problem
  • Function called in itself
  • Loops (for, while) are a way of creating recursive functions without the advent of calling the function inside itself
  • A common method of simplification is to divide a problem into sub-problems of the same type. For example:
    • How do you move a stack of 100 boxes?
    • Answer: you move one box, remember where you put it, and then solve the smaller problem: how do you move a stack of 99 boxes?
    • Eventually, you're left with the problem of how to move a single box
  • Here is another, perhaps simpler way to understand recursive processes:
    • Are we done yet?
    • If so, return the results. Without such a termination condition a recursion would go on forever.
    • If not, simplify the problem, solve the simpler problem(s), and assemble the results into a solution for the original problem.
    • Then return that solution

Source, among others:

The concept of recursion can be easily observed in the case of the Serpentine Pavilion. You start with a simple rule of connecting the middle of one size of the square with the first third of the adjacent side:


So instead of following a 1/2 to 1/2 rule, which would create a simple square spiraling inside itself, the algorithm follow a 1/2 to 1/3 rule, which creates a spiraling square with intersects with itself. This slight change in the rule ends up increasing the complexity of the final result and creates more support points for the structure of the building.

The 1/2 to 1/3 rule is iterated only 7 times. By the dimensions of the pavilion (17x17m), this is enough to end up with efficient beam vs. holes sizes:


As the final step, all lines from all squares are extended. Then the borders are "folded" down to form the box, so that the pattern/structure continues until the floor.


The final result is beautiful, complex, and most important, extremely efficient structure-wise and construction-wise.

No comments:

Post a Comment