I blogged about this here. Here's my take on the language:
I expected it to have a much different feel than it does. I expected a domain-specific direct-manipulation model, and I got a thin procedural wrapper. For example, consider the RGB Cube demo. I'd expect the source code to look something like this:
#pragma 3D_WORLD
Square s; (implicitly centered in the viewport)
s.all_faces.shading_method =
Shading_Method_Interpolate_Vertices;
s.vertices.front_upper_left.color = black;
s.vertices.front_upper_right.color = red;
s.vertices.front_lower_left.color = green;
s.vertices.front_lower_right.color = yellow;
s.vertices.back_upper_left.color = blue;
s.vertices.back_upper_right.color = purple;
s.vertices.back_lower_left.color = cyan;
s.vertices.back_lower_right.color = white;
on mouse_move {
s.rotate_around_x_axis(mouse.delta_x);
s.rotate_around_y_axis(mouse.delta_x);
}
But the actual language is much easier to implement, and much more disappointing from a user's perspective.
- Instead of having things like mouse movement deltas readily available, you have to explicitly remember the old mouse position, and subtract it from the new position.
- The square, instead of being an object, is defined as a series of calls to the vertex() function, preceeded by beginShape(QUADS), and terminated by endShape().
- The color of the vertices is also completely dependent upon the order of function calls -- you call fill() to set the global color, and that gets inherited by the calls to vertex().
- There's this completely non-intuitive idea of push() and pop(), to save all the global variables, presumably so that cumulative calls to translate() don't walk you off the screen. At a minimum, I would have expected the loop() function to have implicit calls push() and pop().
In other words, Processing seems to be nothing more than a thin layer over OpenGL, implemented inside a Java applet. That's probably a good approach if your goal is to teach programming, but seems suboptimal for quickly sketching designs.
I've got to admit though, some of the applets are really cool.
|