Makerbot joy: Lattice structures

Apr 29, 2012 | Code, Libraries, Processing / Java, Watz work

I’ve been lucky enough to borrow a Replicator from the nice people at Makerbot Industries, and so I’ve spent the last week obsessively generating STL files and feeding the machine with G-code. Not always with success, I’ll admit, the Makerbot is a temperamental beast and I’m not an expert at handling the machine yet.

Yesterday I arrived at what I think is an interesting new direction, constructing lattice structures out of low-poly models. I’ve been putting Modelbuilder to the test, adding new functions to help in generating these pieces. Most excitingly I’ve added a UTransformer object that takes triangle or vertex data and transforms them to produce modified geometry.

Typical UTransformer applications include typical cases like face extrusion or windowing, as well as the technique shown here of outlining faces with boxes. But it also makes it possible to apply attractor forces to entire UGeometry instances, as seen in this example where faces were extruded followed by attractors applied to the vertex data to distort the whole form.

By the way, did I mention I’m actually pretty bad at math? Doing computational geometry for a week straight has made me feel a little smarter, but all that does is make me better equipped to understand how little I really know. I can’t help but feel that CAD professionals would snicker at my minor victories considering that every feature I laboriously implement has been standard issue in every CAD package for over a decade. Still, the satisfaction of doing it yourself and knowing exactly how the code will behave makes it worth the struggle.

However, I would welcome smarter minds than mine taking a look at the Github Modelbuilder repository and pointing out possible improvements. Just saying.

I’ll release the updated Modelbuilder code on Github when it’s stabilized a little, I’m still working out what the best structure would be for the library and I don’t want to annoy people by renaming or moving classes around. Meanwhile I’ll keep the Makerbot running 24/7.

To maximum build volume and beyond!


, , , , , ,

NYC Workshops – 1 down

Apr 22, 2012 | Code, Libraries, Processing / Java, Workshops

Yesterday saw the first of my NYC workshops, introducing participants to principles of generative systems. My thanks to the great group of people who took part, proving once again that one of the biggest perks about living here is the range of people you meet. Who would not enjoy discussing the merits of LISP vs. Processing? Lately I keep bumping into the viewpoint that Java is a stodgy dinosaur compared to dynamic languages like Javascript. Vive la difference, I say.

My biggest takeaway from the workshop? GUI control of parametric systems is great, but realtime rebuilding of models based on GUI control is HOT. Fortunately, such behavior is often not so much harder to produce than simple parametric control. It just requires retaining the information describing the system in a neutral state, then applying parametric modifiers to produce a transformed instance whenever GUI controls are updated. I’ll write up an example and post it when I have a chance.

In other news I have Github’ed the new Modelbuilder source, anyone interested can download it here:

This is still a pre-release, but adventurous souls can either compile it from source or use the Modelbuilder-0006 version found in the “exported” folder. That’s the version I used at Processing Paris. More examples are critically needed, I will try to add some in the next few days.

, , , , ,

Processing Paris results

Apr 17, 2012 | Code, Processing / Java, Workshops

Slideshow of work by participants in my Processing Paris Master Class workshop

I just got back from an excellent stay in Paris teaching a Master Class workshop for Processing Paris. I was very impressed by the level of the people in my workshop, as well as the results from the other two workshops taught by Andreas Gysin and Julien Gachoadot (v3ga).

My heartfelt thanks go out to Mark Webster and the rest of the Processing Paris crew, for hospitality rendered as well as for the great chance to work with some very talented people. Rumors has it they might hit New York soon, and I can’t wait to help make that happen.

Above is a slideshow of some of the work produced in my workshop. The examples I showed centered on possible uses of my Modelbuilder library and as a result the output typically dealt with 3D geometry. It was a great opportunity to test Modelbuilder “in the field”, giving plenty of feedback as to possible improvements and outright bug fixes.

A new Modelbuilder release is imminent, I intend to release it this week. It will feature a lot of changes that are unfortunately incompatible with previous versions, but I hope the range of useful new tools it includes will make up for that inconvience.

For the Processing Paris participants: Please let me know about any Modelbuilder bugs you found during the workshop so I can fix them. I know about readSTL(), but there are a few more I think.


Here are some links to work by Processing Paris participants, well worth a look. Unfortunately I can only post the ones I know so if you were at the workshop and have a portfolio site please let me know and I will post it here.

, , , , , , ,

FitBit, shame on you

Apr 7, 2012 | AHO, Code, News, Open source, Workshops

Update, April 2013: Getting Fitbit intraday data is possible through a back door of sorts. Clay Gregory’s jFitbit library makes this easy:

I wrote UFitbit for a data workshop, it’s a simple Processing library that sits on top of jFitbut and facilitates batch downloading of Fitbit data for local storage. UFitbit comes with examples showing how to download from Fitbit and later to access the locally stored copies for visualization purposes.

Source and binaries can be found on GitHub:

Requires Processing 2.0b and Modelbuilder.

Original Fitbit complaint

I just bought a FitBit activity tracker, thinking it could be a fun toy that I could use as a test case in workshops. At $99 it seemed like a decent deal, and from what I’ve heard it’s a pretty decent piece of technology with smart web-based statistics.

So far so good, I’ve worn the device for one day and as predicted it’s mildly satisfying to see logs confirming my pattern of sedentary desk life interspersed with occassional dog walking. Happiness all round.

But then I log on to the FitBit web site (which looks good, btw) and notice a button saying “Premium”. Curious to see what services FitBit considers worth paying an extra $49/year for, I click on it only to discover to my horror that data export apparently is one of those services.

Seriously? What the hell did I buy this thing for, if I can’t get the data? It’s a data tracking device, people.

I guess it was naive of me to believe that the data I generate would belong to me. It must be my Open Source gullibility getting the better of me. I should have known, data capitalism trumps free information any day.

On the plus time I still have time to return this cute little gizmo. It does seem like a good product, but if I can’t get the data without paying extra my enthusiasm is already gone. I’m not training for a marathon and I’m not enough of a narcissist to want to compare my stats to my FitBit “peers”. I really just wanted the data, and I’m too cheap to pay $49 for it, if only on a matter of principle.

Thanks for being yet another entry in the rogue’s gallery of data hoarders, Fitbit. You could have gone the way of the light, but you were tempted by the path of darkness. I realize you have to make money, but people’s data is the wrong place to start.

Updated: Let’s Google “FitBit hacks”

Ok, so it turns out there are some proper FitBit hacks out there, including this little Google Apps hack by John McLaughlin (LogHound on GitHub) that seems capable of auto-retrieving your data hourly. I got it running with Google Spreeadsheets but obviously haven’t tested it over any longer interval. This still only gives daily updates, which is a far cry from the minute-by-minute granularity I would like and which the device clearly supports. Turns out FitBit has an API called API-Get-Intraday-Time-Series which would give you that dataset, but it’s part of what they call a Partner API which is restricted to a case-by-case basis. So given good karma (or a lucrative app proposal) one could potentially get the data.

Hacker friend Qdot has taken a more low level approach with libfitbit, going straight to the tracking device and communicating with it over USB. This approach seems promising, but I don’t have any Linux boxes around and there’s no Windows support for now. In any case that’s not a likely avenue for students unless they’re on the seriously techy side, and my goal with the FitBit was to find a student-friendly tracking device.

The search continues, but at least I’m considering keeping the darn thing. That would save me from kicking myself for having to pay return shipping and a $15 “restocking” fee just to recoup a few dollars if I did decide to return it. The fact that FitBit at least has an API up and running helps a little, even though I’m unlikely to recover my enthusiasm for their business practices.

, , , ,

Announcing: Upcoming workshops in New York

Apr 4, 2012 | News, Processing / Java, Workshops

Update: The first round of workshops is now all sold out. You can email me to be put on the waitinglists for any of the three workshops. I will run the workshops again in June / July, so sign up for my mailinglist if you’re interested in participating. That way you get word as soon as I announce the next round so you can get a spot early!

This Spring I will be hosting a series of one-day independent Processing workshops in New York, starting April 21. The workshops will focus on generative form strategies (introduction and advanced), with a few more esoteric offshoots like parametric modeling for 3D printing and drawing with machines (working with plotters). I’ll be taking groups of 8-10 people to keep it intimate and allow for plenty of interaction within the group.

The plan is to put together a curriculum of some of my most useful tricks for developing and optimizing generative visual systems, packaged as a series of code scenarios that we will go through together in an informal setting. The workshops should be useful for beginners and pros alike, since they’ll be based on solving real-world scenarios with tried and tested techniques. Participants will walk away with code examples dealing with real-world challenges as well as creative strategies.

Venue is TBD for now, but will likely be in Williamsburg or Long Island City. I am already accepting orders for this round, if you want a spot you should send an email to with your name, address and telephone as well as the name of the workshop you’re interested in. I will then shoot you back a PayPal invoice and once payment is received your spot is confirmed, first paid first served. I’m expecting these to sell out so reserve early.

Workshops are $150 each for a 6-hour workshop, with a 10% discount for students OR a 10% discount for booking a second workshop at the same time. All the details are listed on the Workshop page.

, , , , , ,

Code: WordPress WXR parsing v.2

Apr 4, 2012 | Code, Processing / Java

I revisited the code I posted for reading WordPress WXR files in Processing, adding some nice enhancements:

  • Parsing is now handled by a WPPost class
  • Posts are displayed sequentially on the screen
  • Previously exported posts are deleted before a new export is started, using a function to delete all files in a directory (a handy hack all to itself)

Instead of reposting the code here I’ve uploaded parseWordpressWXR to OpenProcessing, a practice I intend to follow in the future since OpenProcessing makes the code more accessible and available to a larger community. I have embedded the applet version below as an experiment, hopefully it works for most readers.

In other news: OpenProcessing just went semi-pro this week, adding a Plus membership structure that gives a few perks and allows users to support the development of the OpenProcessing service. I’m sure some who read the announcement greeted it with skepticism, but I tend to believe community services work better when those developing them have a financial incentive to do so. Sinan Ascioglu has been putting some long hours supporting OpenProcessing and I for one am happy to support the project through a Plus membership.

Applet: parseWordpressWXR.pde


, , , , , , , , ,

Code: 3D Bezier patch

Apr 1, 2012 | Code, Processing / Java

While experimenting with ways to calculate organic mesh surfaces I’ve tried to avoid 3D Bezier patches, since setting up control points programmatically is a bit of a pain. 2D is bad enough. But, as so often happens, I’ve found myself in a situation where I need a structure that is best described as a Bezier patch.

Paul Bourke comes to the rescue with sample code written in C, which took all of 5 minutes to port to Processing. The code below is all Bourke’s apart from the rendering logic. If you don’t know his depository of miscellaneous geometry code and wisdom, run and have a look. It’s proven invaluable over the years.

An applet version of this sketch can be seen on

Code: bezPatch.pde


, , , , ,