10.014 CTD
  • Overview
  • Schedule
  • Administrative
    • Accessing Rhino remotely
    • Rhino for Mac
  • ASSIGNMENTS
    • Dates and rubrics
    • Generative design
      • Generative design
    • Parametric design
      • Parametric design
    • Simulated design
      • Simulated design
      • Simulated design
  • SESSION 1B
    • Computer Aided Design
    • Ranges and expressions 1
      • Ranges and expressions 2
      • Ranges and expressions 3
      • Ranges and expressions 4
      • Ranges and expressions 5
      • Ranges and expressions 6
  • SESSION 2A
    • Visual programming 1
      • Visual programming 2
      • Visual programming 3
      • Visual programming 4
    • Associative modelling 1
      • Associative modelling 2
      • Associative modelling 3
  • SESSION 2B
    • Logical Patterns 1
      • Logical patterns 2
      • Logical patterns 3
  • SESSION 3A
    • Spatial geometry 1
      • Spatial geometry 2
      • Spatial geometry 3
      • Spatial geometry 4
      • Spatial geometry 5
      • Spatial geometry 6
      • Spatial geometry 7
    • Curve geometry 1
      • Curve geometry 2
      • Curve geometry 3
      • Curve geometry 4
  • SESSION 3B
    • Surface geometry
    • Parametric modelling 1
      • Parametric modelling 2
      • Parametric modelling 3
      • Parametric modelling 4
  • SESSION 4A
    • Information nesting 1
      • Information nesting 2
      • Information nesting 3
    • Data landscapes 1
      • Data landscapes 2
      • Data Landscapes 3
      • Data landscapes 4
  • SESSION 4B
    • Mesh geometry 1
      • Mesh geometry 2
      • Mesh geometry 3
  • SESSION 5A
    • Space and time 1
      • Space and time 2
    • Modelling entities 1
      • Modelling entities 2
      • Modelling entities 3
  • SESSION 5B
    • Multibody dynamics 1
      • Multibody dynamics 2
    • Material elasticity 1
      • Material elasticity 2
      • Material elasticity 3
  • SESSION 6A
    • Form-finding 1
      • Form-finding 2
      • Form-finding 3
      • Form-finding 4
  • SESSION 6B
    • AI Image generation 1
      • AI Image generation 2
      • AI Image generation 3
  • APPENDIX
    • Spirograph 1
      • Spirograph 2
    • Curves
    • Swarm Intelligence 1
      • Swarm Intelligence 2
    • Hybrid programming 1
      • Hybrid programming 2
Powered by GitBook
On this page
  • Representations
  • Processes as Sequences of Operations
  1. SESSION 1B

Ranges and expressions 1

Spreadsheet programming

PreviousComputer Aided DesignNextRanges and expressions 2

Last updated 9 months ago

The objective of this session is to introduce fundamental concepts and skills in design computing. We will cover the notions of sequences and transformations, information representations as well as touch upon generative design. We expect here some basic familiarity with spreadsheet and interactions with CAD software.

Representations

The notion of representation is related to cognitive processes. Briefly, we reason based on mental, visual and physical constructs. Those can capture exactly the same ideas but with different means, for example we can express the notion of linearity in the form of a mathematical equation y=ax+by = ax + by=ax+b; a physical entity, such as scribe drawn on a piece of paper; or an object, say a straight edge. The are all facets of the associated characteristics we attribute to the underlying concept.

Representations are complementary in a sense, but each has its own benefits and limitations. We often employ multiple because they allow us to externalize cognitive processes, to communicate ideas, to off-load information and enable us to process information within a finite cognitive budget, and to take advantage of the power of our sensible sub-systems.

For our purposes we will use here three different representation systems:

  1. a cellular data view of information using spreadsheets

  2. a command line interface (CLI) for issuing drawing instructions

  3. a computer aided design (CAD) environment for visualizing 3D entities

Processes as Sequences of Operations

Computation explores the notion of a process, a sequence of operations that take place in time (by people or computing machines). Let us introduce the abstract notion of information processing through the idea of a sequence, a range, a series, or a signal; nomenclature varies depending whether we look at it from a mathematical, computer science or engineering perspective.

We will start with a blank spreadsheet, you may use MS Excel, OpenOffice Calc or Google Sheets, and create the most basic range possible: the natural numbers. We input the label “index” in the first column and zero as the initial value in the cell below. To create a range we enter the expression = A2 + 1, which translates to “read the value above, add one and write it in this cell”. We then drag the corner handle down to automatically expand the range. Conceptually, this integer range represents the discrete ticks of our imaginary computing clock.

Range expansion is an amazing feature of spreadsheets that makes them popular for quickly replicating repetitive actions that exhibit some form of structure or pattern. Spreadsheet data manipulation is the oldest and still the most popular form of visual computing!

Symbolic Expressions

The notion of a symbolic expression is foundational to computing. You are already familiar with such expressions from mathematics. Manipulating symbolic variables for solving equations, independent of actual values, is a core component of algebra.

The expression entered above however, is conceptually somewhat different from a mathematical equation which establishes relationships between variables. A key distinction is that a computable expression has concrete inputs and it results to concrete outputs. In other words, we can directly evaluate computable expressions.

For example x + y = 1, mathematically means that pairs of numbers, e.g. reals, must always add up to unity (“one”). This establishes a relationship, or constraint, between the x and y variables, but does not imply directly a way of determining those pairs that adhere to the relationship. We need to solve for “x” and “y”, i.e. search for them.

On the other hand, input + 1 is a computable expression for determining a new value given an existing one. In computing we write output = input + 1 to show where the new value is supposed to be stored. The proper way to interpret this statement is as output ← input + 1. The arrow, highlights clearly the distinction between a mathematical equality, a sense of truth, and a computational operation of (1) reading a value, (2) performing an addition and (3) storing the result.

Information Layout

Another pleasing aspect of spreadsheets is that they visually capture the notion of information storage through cells i.e. content placeholders. The particular “memory” layout is that of a rectangular grid. The arrangement of cells in a two-dimensional layout is influenced by the flat shape of the monitor and perhaps traditional paper media. It has nothing to do with what we can compute!

For example, we may stack all columns vertically and still be able to perform the same operations. In fact, in general computing we conceptualize memory as linear, like a single column. Nevertheless, even though the shape of the data does not matter for computation, it does help us to reason about them.

Types of Information

A cell contains a single value, which generally may be a number or a text entry. This differentiation between data types is also important because the operations we can perform depend of those types. For instance, we can add and multiply numbers, but those operations are not directly meaningful for text values.

Spreadsheets blur the boundaries between types because eventually all information is visualized as text. It is important however for us to differentiate between the visual representation of a number, which is transformed first to text and then to pixels, from its actual information content.

Referential Indirection

Linking cells, using their columns letter and row number, as part of expressions, enables a notion of indirection, where we do not have to repeat or copy manually values, but retrieve them knowing the location they are stored. The idea of knowing, finding and using the index or offset between locations in storage is surprisingly very common. The concept of making a copy versus referencing a value from another location is also very critical to familiarize with, and spreadsheets offer a helpful mental paradigm you may always relate to.

Range expansion