Category: Code

MakerBot models 5486

MakerBot models built with code included with the ModelBuilder library, also downloadable from my Thingiverse account

Update, April 24 2012: Modelbuilder-0007a01 with complete source and new examples is now on Github: https://github.com/mariuswatz/modelbuilder. Download the exportded/modelbuilder-0007a01.zip for the latest version packaged and ready for use in Processing (1.5.1 only…)

Update, July 1 2011: I’ve uploaded ModelBuilder v0004, which fixes a few really silly bugs in 0003. Download it from http://code.google.com/p/codeandform/.

I’m happy to announce the first public release of my new ModelBuilder library, created as part of my artist-in-residence project at MakerBot Industries and beta tested in the Interactive Parametrics workshop. The occasion for today’s release is the MakerBot User Group New York, where I’ll talk about the library and show off my MakerBot models.

ModelBuilder focuses on functions useful for digital fabrication purposes, such as creating meshes, centering models around origin, scaling to given dimensions, output to STL format etc. It emulates Processing’s beginShape / vertex / endShape logic to build mesh geometry which can then be manipulated and transformed.

The UVertexList class allows the user to build paths of vertices. Vertex lists are then fed into various UGeometry.quadStrip() functions to construct quad strip meshes, most likely eliminating the need for dozens of for loops in the process. See the online copy of the ModelBuilder JavaDoc for a more complete overview.

Read the rest of this entry »

12 Comments »

I’m working on a new 6-panel Grid Distortion piece for my Extrusion show next week, the final size will be 540 x 50 cm. I’ve been revisiting all the previous incarnations of the piece and tweaking the code to elicit new interpretations. Which led me to compile this summary of formal “typologies” that the piece is capable of exhibiting.

Given that the piece is essentially a variation on a very simple attractor simulation it tends to give very obvious (even almost boring) results, and its only through extensive tweaking of parameters and custom rendering styles that I’ve found results I’m excited by. Dave Bollinger made an accurate comment on Flickr that these are perhaps not very “watz-y” images, but its the translation of the form onto wood or metal that somehow completes the form for me.

Marius Watz - CircGrid03A 0010

Grid Distortion expanded: CircGrid on aluminum

Just last week I had some new aluminum pieces made in Berlin with Martin Bauer at Lasern in Berlin that represent a new direction in the series. Loosely titled CircGrid, these expand the same process to radially oriented grids. This might seem like an obvious extension, but the results are actually quite different. The images look less architectural, bringing to mind structures from nature like neurons, blood veins and plant roots etc.

I’m definitely enjoying this new and slightly more chaotic direction, as well as the crisp technical look of the aluminum.

No Comments »

Hot on the heels of the Interactive Parametrics workshop I’m now in Oslo working on a solo show that will open March 11 at ROM For Art + Architecture (Oslo). Titled “Extrusion”, the show highlights how my practice has bee evolving to dealing with ways of physically communicating code-based processes beyond the default means of the computer screen or projection.

The show will feature a new version of the light installation Prime, this time realized with fluorescent tubes and DMX lighting control. Other elements include a wall drawing made by retracing projected vectors with painters tape (1.2 km of it), as well CNC plotter and laser drawings (Arc Drawings and a new multi-panel Grid Distortion.)

Finally, I’m building a large geometric structure (see above) using my ModelBuilder library in Processing. The forms are designed to be easy to unwrap to 2D without tesselating polygons. I’m outputting cutting templates as PDF files to be used by the CNC routers. This is a new process for me, despite having followed the success people like Martin Fuchs has had with unwrapping polygon meshes. It allows me to work on a fairly large scale (as in 3 x 3 x 1.5 meters), articulating actual structures rather than representations of structures.

All in all it’s a very exciting show to be working on, and I’m grateful to ROM and its director Henrik der Minassian for supporting all this craziness… If you’re in Oslo next weekend I hope to see you there!

Exploder wall - Install 05

Previous tape drawing: Exploder at System:System

No Comments »

Bybanen1006 1202 Prime

To be revisited: Prime light installation

I am currently working on a solo show for ROM Art + Architecture in Oslo under the title “Extrusion”, opening on March 11th. The show will focus on physical installations, a bit of a departure from my software works that I’m very excited about.

One of the pieces will be a new version of my light installation Prime, a public art commission for the Bybanen light rail system in Bergen last year. The Bybanen version uses LED lighting elements and electric relays, intended to be stable for a minimum of 5 years in the rough environment of a subterranean tunnel. The new version will use fluorescent tubes and computer-controlled switching via a DMX-512 lighting control interface.

Fortunately there are several USB interfaces for DMX control, as well as a recently released Processing library by Henri David titled dmxP512. Thanks to the generous assistance of Dan Shiffman I was able to test my interface with dmxP512 today. I’m very pleased to say that both the USB box and David’s library worked without a hitch, literally working perfectly on the very first attempt.

Even given the simplicity of the DMX standard it’s rare that anything works that easily, let’s hope I don’t jinx myself by writing it publicly. In any case, the exceedingly simple code I used is listed below, based on the sample code provided with the dmxP512 lib. Happy hacking, my thanks to Henri David for the library!

Code: DMXTest01.pde

Read the rest of this entry »

4 Comments »

New piece: abstract01js. Built with Processing.js

I finally had an excuse to take Processing.js for a spin. Aram Bartholl is doing one of his Speed Show exhibitions this Wednesday (SPEED SHOW vol.4:’Super Niche’). The Speed Show format is based on taking over an internet cafe and showing artworks that can run in regular browsers without any special software.

Since most of my pieces use OpenGL they’re not suitable for web I decided to try porting an old 2D sketch to Processing.js. Rendering Processing code in the browser by using the HTML5 Canvas and Javascript is a nice idea, but I was curious to see if it would work for my purposes.

As it turns out, the code for Abstract01 from 2003 (originally created for Abstraction Now) worked on the first attempt. After a few adjustments I now have one interactive and one “automatic” version running perfectly in Firefox and Chrome. I have to say I’m officially impressed with Processing.js, my hat off to John Resig and crew!

SPEED SHOW vol.4 takes place today Wednesday, Oct.27 at 90 Bowery in Manhattan, in the 90 Bowery Internet Cafe. Here is the list of participating artists:

Erik Andersson, Cory Arcangel, Michael Bell-Smith, Charles Broskoski, Jon Cates, Aleksandra Domanovic, Doubble Happiness, Constant Dullaart, JODI, JK Keller, Greg Leuch, Olia Lialina & Dragan Espenschied, Duncan Malashock, Eva & Franco Mattes aka 0100101110101101.ORG, Aaron Meyers, Mark Napier, Katja Novitskova, Paper Rad, Jon Rafman, Ariel Rebel, Ryder Ripps, Evan Roth, Brad Troemel, Marius Watz

It’s an honor to be showing in such excellent company…

2 Comments »

I wrote a useful piece of code during the recent Shakerag workshop that makes it easy to save and load parameter data from text files. To celebrate the recent launch of the new Processing Wiki I have added it there, but for completeness I will also post it here.

Code: Data.pde

Use Data.beginSave() to initialize data string collection, then add data with Data.add(). To write to file, use endSave(filename). I’ve included code for auto-incrementing filenames, it’s used in the example code.

To load data, call Data.load(filename), then use readInt(), readFloat(), readString() etc. to get values from the strings read from the text file. Used properly this should give you most of the flexibility you need for simple data saving.

Read the rest of this entry »

No Comments »

Ever since doing Stockspace project it seems I am getting asked to do data-related work. This despite the fact that my personal interests diverge from such masters of insightful infographics as Martin Wattenberg, David McCandless or Jonathan Harris.

Suffice to say that I am more concerned with exploring data structures as spaces than I am with providing new understandings of the information contained within them. Manuel Lima’s Information Visualization Manifesto calls for a seriousness on the topic of data treatments, while my projects remain comfortably frivolous.

Recently I’ve been working on a project that has required researching data sources and adapting them to illustrate a bigger idea, which has led to much Googling in the absence of good data from the client. Sometimes you find the right thing immediately, but sometimes data is hard to find in a format that is freely available and easily parsable. Since I have found some good sources I thought I’d share them here…

Miscellaneous free data

I would be interested in hearing tips about any great data sets out there, particularly interesting time series data.

Miska Knapek recently sent me a link to a source of weather sensor data from Helsinki, including measurements of wind direction at the top of Helsinki’s Olympic Tower in 5-minute intervals. He has already made some wind visualization videos and some fabricated wind data sculptures based on this data.

3 Comments »

Jer Thorp: NY Times visualization

Jer Thorp: NY Times: 365/360

Processing visualization head Jer Thorp is putting his money where his mouth and publishing 7 pieces of code in 7 days, free to download and experiment with. Judging from the three that he’s released so far they’re not your standard 20-minute sketches either:

  1. GoodMorning! is a Twitter vizualization, showing users around the world popping up on a globe as they utter the magic words “good morning”. With a little geocoding and spherical mapping thrown in, this is a sweet sketch
  2. NY Times: 365/360 uses the New York Times open data API to retrieve news stories for an entire year and draw connections between them. The results combine complexity with elegance for that true infoporn look.
  3. tree.growth revisits that old classic, the L-system tree. Thorp uses colors and abstract “leaves” to great effect.

With such a strong start, one certainly looks forward to seeing the next four sketches to come. It’s not so common to find sketches of this complexity freely available, so they’re a great study for users who are on the threshold of making more complex applications.

No Comments »

Good news for Processing heads who use sound: Damien de Fede has released a new major version of his excellent Minim library. Along with bug fixes, new features include:

  • added functions to FFT for doing forward transforms with an offset: forward(float[] samples, offset) and forward(AudioBuffer samples, offset)
  • added a freqToIndex(float freq) method to FFT for finding out the index of the spectrum band that contains the passed in frequency.
  • added a stop() method to AudioSample, so that playing samples can be immediately silenced.
  • added setPanNoGlide(float pan) to Controller, which will snap the panning setting of a sound to the provided value.
  • added setInputMixer(Mixer) and setOutputMixer(Mixer), which allow you to specify which Java Mixer object should be used when obtaining inputs (AudioInput) and outputs (AudioOuput, AudioPlayer, AudioSnippet, AudioSample).

Download from the Minim project page. Read more about the development process on the Compartmental blog.

No Comments »

Processing does not provide any direct mechanism for manipulating the look of the sketch Window, but Java natively supports tricks like turning off the window chrome, explicitly setting window position and making a window “float” over all other UI elements. All of this can be accessed via PApplet’s internal “frame” field, which holds an instance of a Frame object representing the window your sketch is running in. But even so, Java won’t let you have free reign without a little trickery.

The following hack demonstrates how to make a window that has no OS chrome, always stays on top of the UI and has an explicitly set screen position. You can even use the cursor keys to move the window around the screen.

Personally, what I like most about this hack is that it gets around Processing’s (or possibly Java’s) assumptions about a minimum window size of ~120×120. If you specify a size that’s less than 120 on one side, Processing will be pad that side with grey pixels to reach the minimum. But with this hack you can have tiny windows that you can micro-manage to your heart’s delight. I use it to make debug dispays, small control panels and other useful things.

Update: @CedricKiefer pointed out another Processing example that allows for transparent and even irregularly shaped windows. It’s Windows-only apparently, I bet this kind of thing is a major violation of Apple GUI laws anyhow.

Update 2: @ideoforms took my post literally and made a sketch with multiple bouncing windows. Nice.

Code: FloatingWindow.pde

Read the rest of this entry »

3 Comments »