Archive for October, 2011

Arc mesh tool created with Modelbuilder and ControlP5

I did a short lecture + workshop about digital fabrication and parametric modeling with Processing yesterday at NYU’s ITP program. Thanks to Dan Shiffman for the invite, it ended up being a lot of fun because of the great turnout of enthusiastic ITP’ers. It certainly made me even more regretful that I was unable to teach a fabbing course at ITP this semester, but with luck there will be other oppportunities.

As promised I have uploaded the pre-written examples I demo’ed as well as the code I (frenziedly) wrote live during our 1.5 hour coding session. The focus was to demonstrate the logic of the Modelbuilder library, a set of utilities and aimed at abstracting and simplifying some common tasks in computational creation of 3D meshes.

The library is really not all that sophisticated, but it shifts the focus away from OpenGL drawing logic towards a more object-oriented way of imaging 3D forms based on UVertexList objects. In a typical situation it should simplify a lot of tasks, as well as save dozens of for() loops and repetitive code. It also allows some pragmatic coding (aka “lazy”) coding practices enabling easy reuse of geometries due to the assumption that operations like “new UVertexList(vl)” should always copy input data by content rather than by reference.

I’m pleased to say that Modelbuilder performed well in the demo session, there’s nothing like live coding to reveal weaknesses or inconsistencies in code. But the Modelbuilder logic proved consistent under stress testing and we were able to do some pretty decent mesh generation in a limited amount of time.

Download: Workshop Code

A ZIP with all the files shown (including the Modelbuilder and ContolP5 libraries) can be downloaded from http://db.tt/5Ehmn6uz. It includes the following code examples:

  • simple_geo_arc_4 A tool for creating a composition of 3D arcs (w/ valid face normal orientation and passing the “waterproof” criteria for 3D printing), generating output to STL format. This was written live in around 30 minutes.
  • mb_04_gui_parametric A parametric 3D form generator created for my Makerbot residency – results look valid on screen but for some reason export to STL results in flawed models. I’ll look into debugging this example.
  • mb_04_gui_heightfield An example showing how to create a heightfield mesh from an image, allowing interactive control of mesh resolution and Z scaling. Potentially useful for geographical elevation maps and Kinect depth maps.
  • A set of examples demonstrating the core Modelbuilder functions

4 Comments »

This blog has been quiet for a while, due not to laziness but rather lack of time. Some random notes to let you know what I’ve been up to:

  • I just set up a Tumblr blog to post more theory-related thoughts that don’t fit this blog so well. First post: Things I’ve learned from disagreeing about (Media) Art on the Internet
  • I’m working on some new objects for 3D printing, experimenting with interfacing Modelbuilder to Wblut’s Hemesh library. I have some promising results so far, but actual print tests remain. I will try to post more about this later, specifically providing a class that acts as a bridge between my UGeometry objects and the HE_Mesh data structure. Interchange of mesh data is the biggest issue for 3D libraries right now, hopefully the upcoming PShape3D structure will facilitate this.
  • The Modelbuilder lib is due for an upgrade, I’ll do this when Processing 2.0 is out for good.
  • I had a great time doing a solo show in San Francisco this summer, as part of the SF Film Society’s Kinotek series, see documentation on Flickr: SFFS Kinotek – Automatic Writing. Thanks to Sean Uyehara and the others at SFFS, as well as the excellent people I met during my stay.
  • The SF show featured the biggest collection of Makerbot objects to date – about 25 pieces: Form studies (Makerbot). As always my thanks go to the Makerbot clan for excellent support, at the craziest I had 6 Makerbots printing at once.

No Comments »