Well, that was easy (really, with auto-completion and 'print' it took all of 5 mins).
#NODEBOX NETWORK DATA CODE#
Now you can originate geometry using NodeBox routines and then integrate them with the FLine based drawing code - pretty cool. And see below for more ways of moving between FLine and Path) The rest of the _self.lines code should be familiar from the FLine drawing tutorials. appendShape(.) appends a Java 2D General Path to a Field FLine.
ellipse ( 10, 10, 10, 10 ) # and this takes a nodebox path and turns it into a Field FLine line = FLine (). clear () # this is pure nodebox np = Path () np. # this imports the nodebox libraries that we need from aphics import * _self. To make the connection to Field very easy first build NodeBox with this command: Building from source gets you documentation inside Field's autocomplete, but otherwise it's the same functionality.
#NODEBOX NETWORK DATA DOWNLOAD#
You have two options - you can build NodeBox from source, or you can just download one of their binaries. We're going to use the "text_fx.ndbx" example:
NodeBox2, meet Fieldįirst, let's download the beta of NodeBox from here. This can only mean one thing - it really is time to get Field's hooks into NodeBox and start tracking their beta releases. Let's assume that that NodeBox's spline code remains as well developed, tested and documented as it has been even as their team goes through this complete rewrite. Thankfully, we didn't bother figuring any of this out, because the latest beta version of NodeBox has taken a very interesting and unexpected twist - it's now a Java/Jython project (just like Field) with an all new, even more hybrid (and even more interesting) interface. It was going to be pretty tedious, because while Python-based, NodeBox was very much "non-pure" Python - much of it was a wrapper around Quartz (Apple's native drawing code). We like our API's but we don't think they are the last word on 2d drawing by any means. But NodeBox's 2d spline code has always been well developed, well tested and well documented - so much so that we'd been thinking about ways of hacking into it to let Field users use that API as well as "ours". Field's 2d drawing tools we're started before we heard of NodeBox, but our image filtering extensions we're directly provoked and inspired by that project. Not only is it a hybrid visual programming environment for making 2d vector & bitmapped images, but it uses Python as its programming language. For as long as the Field project has been going we've been keeping an eye on NodeBox.