« BBS Memories | Main | Strange Tech Support »

NodeBox is Great

I just discovered NodeBox, a really neat graphics programming tool for the Mac. It's based on Python and lets you easily write programs to generate 2D graphics. You can create PDFs or animate them and create QuickTime movies.

Tools like this are a great way to get kids interested in programming. The immediate feedback and visual rewards really let kids get into the programming aspect of it, incrementally increasing their program complexity to make more and more elaborate visuals. I could see tons of uses for this tool in math and science curriculums as well; for example, you could simulate an experiment, measure a real experiment, and then render the two results on top of each other.

Here's a screenshot of a program I was playing with, follow the link below to see it in action.

NodeBox.png
Here's the program I wrote:
# NodeBox script to draw letters of a message in a sinusoid

import math

message = "NodeBox is neat"
period = 20

def setup():
    global frame
    frame = 0

def draw():
    global frame, message
    for i in range(len(message)):
        x = 100 + 20*i
        y = 150.0 + (i+1)*6.0*math.sin((i+frame)*3.14159/10)
        text(message[i], x, y)
    frame += 1

speed(10)
It renders the message one letter at a time, using a ramping sin wave for the vertical position. Here's the movie of it in action: