4T 2015 Keynote: Learning to Code and Coding to Learn!

You can download my slides as a pdf or PowerPoint.


Processing

For many folks, Processing is something new. For illustration, here is a progression of easy sketches that give some of the flavor of Processing.

drawSomething

This sketch opens a window, and wherever you move the mouse, it draws an ellipse. The draw() method fires 60 times per second (i.e. the frame rate is 60 fps). You can play with it yourself, or just watch the video.

DrawSomething

Here's a video demonstration of the sketch:

Hello World from Pete Benson on Vimeo.

drawWithColor

This sketch introduces color using RGB. In Processing, you specify a value from 0-255 for each of the three primary light colors. Zero means the color is excluded, 255 means you are using a maximum amount of that color.

DrawWithColor

drawWithTransparency

Color can also have a transparency level. In this sketch, we let our ellipse fade out by drawing a faint white rectangle on top of our drawing. At 60 fps, the paint gradually disappears.

DrawWithTransparency

drawSpreadingPaint

You can detect how fast your mouse is moving. This sketch uses that information to change the behavior of the drawing.

DrawSpreadingPaint

Comments are closed.