It is also available as a block.
Background
- Sol LeWitt is a conceptual artist who typically produced directions for producing a piece of art. Those ideas are the art itself. Learn more about Sol LeWitt here.
- I made a standalone version with 40 rectangles and 15px wide bands. I thought it would be a fun learning experience to make it customizable with user inputs, so I made it possible for users to change the number of rectangles and the width of the bands and see the differences in real-time.
- Here is #614 implemented on a wall at MASSMoCA.
Here are Sol’s original instructions for Wall Drawing 614:
Wall Drawing 614: Rectangles formed by 3-inch (8 cm) wide India ink bands, meeting at right angles.
Technical Details
For the technical details of making the drawing itself, check out my post on it. This post focuses on rebuilding the tool based on user input.
The Inputs
I used a form
, a range input
, an output
, and some in-line JavaScript to power the sliders and display their values in real-time:
Live example:
Basing my functions on the values of the inputs
A set a variable to the element I wanted to access, then I called the .value
of that element in my functions. (See the post on 614 for more info about these functions.)
Rebuilding after inputs are changed
Similar to rebuilding on screen resize in the original version, I detect when there is a change in one of the inputs and then call a function to remove the divs and rebuild the treemap based on the inputs. jQuery makes this kind of thing fast and easy:
Want to dig in a little further? Check out my implementation and view source. All of the specs are there.