Boston Python Workshop/Saturday/ColorWall: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Jesstess
No edit summary
imported>Jesstess
No edit summary
Line 1: Line 1:
The ColorWall is a framework for implementing and displaying effects for a wall of pixels. During the Saturday workshop, you will write your own effects for the ColorWall.
The ColorWall is a framework for implementing and displaying effects for a wall of pixels. During the Saturday workshop, you will write your own effects for the ColorWall.


<gallery caption="Example effects" widths="200px" heights="200px" perrow="3">
[[Image:Colorwall_rainbow.png|thumb]]
File:Colorwall_rainbow.png
File:Colorwall_matrix.png
File:Colorwall_twinkle.png
</gallery>


=== Layout ===
=== Layout ===

Revision as of 17:05, 4 March 2011

The ColorWall is a framework for implementing and displaying effects for a wall of pixels. During the Saturday workshop, you will write your own effects for the ColorWall.

Layout

The ColorWall code consists of 3 files:

  • run.py: take arguments from your environment (like a specified width and height for the wall), set up the wall and effects, and run it.
  • wall.py: the logic behind the matrix of squares that make up the wall. This file has a comment block at the top that summarize the interface that you will use when programming your own effects.
  • effects.py: where effects live. This is the main file that you'll be editing during the workshop.

Resources

  • Friday setup instructions for the ColorWall
  • ColorWall code on GitHub
  • The ColorWall uses the HSV color space. Wikipedia has a complicated explanation for what that means, but what it boils down to for the purposes of our project is this: each pixel gets 3 values: hue (e.g. am I red, green, or blue), saturation (am I pale or intense), and value (am I bright or dark). effects.py has example effects that exercise hue, saturation, and value independently.