MIT Illuminations Logo
MIT Logo

An Interactive Lighting Installation Powered By  Creative Coding.

MIT Illuminations is an ongoing experiment in creative computation at the MIT Welcome Center. The lights dynamically illuminating the center are, like the MIT community, colorful, ever-changing, and alive.

They were inspired by a long history of the MIT community deploying creative installations of colorful lights in dormitories, on bridges and buildings, and around campus.

Meanwhile, the software driving the lights is published under the open-source MIT license, so anyone in the world can learn how to make their own.

Now Playing at the Welcome Center

SCFG Gradient

Currently Playing at the MIT Welcome Center
Contributed By
Sosolimited, Ryan
Image Credit
---

Set the lights to a single color or simple gradient.

This simple light show transforms the space through colors of the SCFG season


Under The Hood

This is the code currently animating the lights. If you are interested in trying it out yourself, download the MIT Illuminations app for  WindowsWindows (64bit) v1.2.11 or  MacmacOS (64bit) v1.2.11 or clone the  open source repoGitHub .

//
// Simple Colors Template
//

//
// Global variables
//
let c1, c2;
let anchorX = 0;
const speed = controls.speed.value;

//
// Setup
// Called once at beginning of program
//
function setup() {
    createCanvas(helpers.canvas.width, helpers.canvas.height);
    c1 = color(controls.color1.value);
    c2 = color(controls.color2.value);
    noStroke();
}

//
// Draw loop
// Called once per frame after setup
//
function draw() {
    clear();
    createGradient();
    incrementAnchorX();
}

//
// Custom functions
//
createGradient = function() {
    const step = width / 120;
    for (let x = 0; x < width; x += step) {
        const distFromAnchorX = abs(x - anchorX);
        const lerpAmt = map(distFromAnchorX, 0, width, 0, 1);
        const c = lerpColor(c1, c2, lerpAmt);
        fill(c);
        rect(x, 0, step, height);
    }
}

incrementAnchorX = function() {
    if (anchorX > width || anchorX < 0) {
        // Flip the colors
        const ctmp = c1
        c1 = c2
        c2 = ctmp
        // Reset the gradient position
        if (speed > 0) {
            anchorX = 0
        } else {
            anchorX = width
        }
    }
    
    // Increment the gradient position by speed
    anchorX += speed
}

The lights are animated using  p5.jsp5js.org , an open-source JavaScript implementation of the  Processingprocessing.org programming language developed at the  MIT Media Labmedia.mit.edu .

Screenshot of the MIT Illuminations Application

Download the MIT Illuminations Software And Get Started

Windows (64bit) v1.2.11macOS v1.2.11GitHub

Who Made MIT Illuminations

MIT Illuminations is a collaboration between  MIT Admissions, mitadmissions.org MIT Open Space Programmingwhereis.mit.edu, and  SOSOsosolimited.com. The software controlling the lights is publishedgithub.com under the MIT Licensewikipedia.org.

Each light show is developed in partnership with MIT students, faculty, staff, and/or community partners.

MIT is committed to providing an environment that is accessible to individuals with disabilities. Learn more about our commitment to accessibility at  accessibility.mit.eduaccessibility.mit.edu.