0.0 Introduction

Welcome to Rosetta, the new generative design tool for architects and anyone interested in exploring the world computational design. These series of tutorials are aimed at giving you the skills necessary to use Rosetta proficiently in a both academic and professional environment. The tutorials are divided in three categories:

  • Beginner – these tutorials are aimed at anyone who’s new to Rosetta. They will introduce you to the basic functions of Rosetta that allow you to create and modify 2D and 3D models;

  • Intermediate – the intermediate tutorials are aimed at anyone who interested in exploring more complex tools and modelling strategies using Rosetta. Here we will explore recursion and randomness;

  • Advanced – in the advanced tutorials you will acquire the skills to model and process very complex models by using high-order functions, surface mapping and processing.

Before we get started, a few considerations:

  • To follow these tutorials and to use Rosetta you will require two things: the programming environment DrRacket (download HERE) were you will be writing and creating you programs, and a CAD (Computer Aided Design) application. Rosetta is implemented and compatible with several CAD such as AutoCAD, Rhino, OpenGL and TikZ. In these tutorials we will be using Rhino since it can be obtained with a free trial version (download HERE) but feel free to use another CAD;

  • Throughout the tutorials we will occasionally explore different ways at solving specific modelling problems but it is important to note that there are always several way and means at achieving the result. Therefore the solution we show here in this tutorial is but one of many possible solutions and we encourage you to think of different ways of solving each problem;

  • In these series of tutorials we will be using the Racket programming language and we will not be covering the principles of programming with that language so we strongly recommend that you either read Racket’s documentation (http://docs.racket-lang.org/) or Rosetta’s documentation (HERE). We do not, however, assume that you already have previous knowledge of programming and therefore we will try to explain every step as best as possible without going into too much detail;

  • In these tutorials we will use a specific text formatting to help navigation and referencing. Every function provided by either Rosetta or Racket will be formatted like this indicating that you can click the word to be taken to a page where that particular tool is explained more thoroughly; every function and form will be written like this denoting an unformatted text. Small tips, tricks and suggestions will also be provided to you occasionally as side notes.

We hope you enjoy you time using Rosetta and do not hesitate to contact our highly motivated team if you have any particular question or if you don’t find what you are looking for.



Once you have downloaded everything you need go ahead and launch DrRacket. The first time you open DrRacket you will be presented with a blank document divided into two areas. The top area is the “Definitions” area and it is where you will be writing your programs. At the bottom you see the “Interactions” area and this can be used, more importantly, to execute and see the results of your programs. Any errors that occur will also be presented here. On the top right corner you see a button “Run” that you can use to load all the functions you create. Before executing a function you define in the Interactions area you need to click the button Run first. There are other buttons on the task bar but you don’t need to worry about them for now.

In the Definitions area should have at the very top the word #lang. This is what defines which programming language is to be used. DrRacket and the use of Rosetta supports the use of several different programming languages such as Python, Lisp and Processing but the one we will be using is Racket. To tell DrRacket you wish to use Racket as the programming language you need to write the word racket in front of the #lang like this:

#lang racket

The next thing you need to do is to import Rosetta and specify which CAD application you are using. Every functionality of Racket is organized in modules which in turn contain a series of ready to use functions. Some basic functions are already provided from the start but others need to be loaded, or in other words required. Rosetta is also a module and needs to be loaded if you wish to use it. To load modules into DrRacket you need to use the form require followed by the path to Racket’s module repository planet (http://planet.racket-lang.org). So, to load Rosetta you need to write the following code:

#lang racket

(require (planet aml/rosetta))

Finally we need to specify the CAD application to be used. To do this you use the form backend followed by the name of the CAD program:

  • autocad for AutoCAD (all versions);
  • rhino5 for Rhino (version 5);
  • rhino for Rhino (versions bellow 5.0);
  • opengl for OpenGL.

Since we want to use Rhino version 5 we need to write:

#lang racket

(require (planet aml/rosetta))
(backend rhino5)

These three lines of code should be at the header of every program you create in DrRacket and any code you write should come afterwards. From here forward we will not be showing the header again but keep in mind it exists.

We are now ready to start coding and using Rosetta. Whenever you’re ready to continue, please click the link below to start the next tutorial.



1.1 Working with coordinates >>

Top