The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.

General DiscussionFrom the old forum

Pythonista? NodeBox in NodeBox?

6 replies Last reply

  1. I like to develop interactive visualizations for the iPad ON the iPad. One great tool for this is the iOS app Pythonista. It's a wonderful IDE.

    Now that I've discovered NodeBox, I'd love to be able to create visualizations and animations in NodeBox and move them to Pythonista so I could add interactivity and play with them on my iPad.

    I notice that .ndbx files are just XML files with a fairly straightforward structure. And at least some NodeBox nodes are already written in Python (though probably using libraries that might not work in iOS). Pythonista has its own set of iOS libraries for creating GUIs and drawing things. In theory it shouldn't be too hard to translate most NodeBox nodes.

    I understand that NodeBox Live would someday let me run NodeBox within mobile Safari but I'd rather work in Pythonista and leverage their libraries. If I could export or convert .ndbx files to Python code I'd be halfway there. How hard do you think it would be to do this? What libraries would I need?

    A (somewhat) related question: how hard would it be to draw NodeBox networks in NodeBox? This looks like it might not be too hard if I could just figure out how to either import an .ndbx file and parse its XML or somehow convert it to a CSV file. I can put an .ndbx file up on the web and bring it in using the http_get node, but this just gets me the raw text so parsing would be painful. Does NodeBox have any ability to parse XML? There does not seem to be any documentation for http_get.

    Not an urgent request, but it might make an excellent tutorial. It would be interesting to find new ways to visualize a nodeBox network, or even animate it! This would also let us save our beautiful networks as PDFs, print them, and hang them on the wall!

    Copy link
  2. UPDATE

    I was able to answer my second question. It turns out it's quite possible to draw NodeBox networks in NodeBox (see attached screenshot).

    The trick is to convert the XML text of a .ndbx file to JSON using commonly available tools like this online converter:

    http://www.utilities-online.info/xmltojson/#.VPzQ8EK-Qts

    You can then paste the JSON text into a new file, upload it somewhere, and then import it into your NodeBox sketch using the http_get node, and hook that node to some query_json nodes (one for the nodes, one for the connections, etc.).

    From there it's just a matter of looking up what you need, drawing rectangles, connecting them with a link node, and so forth. The only tricky bit was drawing the individual input ports. For this I had to make a CSV file to list the port order for every node and port used in the network.

    As you can see from the attached screenshot, the output is quite legible. Both nodes and links are colored according to node category. I didn't show the rendered node or node comments, but this would not be hard.

    Now that I can draw my own networks, it would be easy to add side notes and callouts, insert a zoomed-in view of a subnetwork, alter the color scheme and add a legend, etc.

    I think it's very cool that NodeBox can draw itself. It's a nice illustration of the power of this tool.

    I will post what I have so far in the "Show Your Work" forum so other people can download draw-network and give it a spin on their own networks. If anyone comes up with some nice network drawings, please post some screenshots!

    John

    Copy link
  3. NodeBox team

    To answer your first question, the nodes could be seen as universal "verbs" that can be programmed in any language. Most of the nodes are currently implemented in Java, though (and in JavaScript as well in NodeBox Live). The NodeBox engine is also written in Java, but is quite straightforward to port to other languages.

    The graphics operations can be quite complex because some depend on functionality provided by the Java APIs, so it would be some work to port those (for example, "compound path" that works much like Illustrator's Pathfinder).

    When we were porting the nodes to JavaScript, we created a dashboard that showed which nodes are there and which nodes still needed to be ported. This might be a helpful overview for you as well:

    http://nodocs.nodebox.net/

    Copy link
  4. john : "I like to develop interactive visualizations for the iPad ON the iPad.". I'm very much in the same boat, and I'm guessing we're not isolated cases..
    Frederik : just curious, "I understand that NodeBox Live would someday let me run NodeBox within mobile Safari". Would that be the full NodeBox experience (albeit running in a browser), or a limited version ? Any (even very sketchy) timeline on that ?

    Copy link
  5. NodeBox team

    We're now doing testing with small groups to fix major outstanding bugs, I hope to release something after the Easter holiday.

    I'll also send you an invite so you can get started early :-)

    Best,

    F

    Copy link
  6. What's the ETA on the Nodebox web platform? I would love to be able to learn more about Nodebox on the go with my iPad. I am a new addition to the node based design world and I am trying to squeeze in my eduction time where possible.

    Copy link
  7. NodeBox team

    We're close to beta. However, the editor will only work on desktop browsers for now, not on iPad. You will be able to view the output in an embed view using any browser, of course.

    Copy link

Know something that helps?

Sign in with your email address to reply. No password needed.

Sign in to reply