AU Library for Processing: The Beta Release!

AUBeta-logo-226-225Huzzah! After a seemingly endless gestation period, my Processing library is ready for its beta release!

You can download the file here. Install it into your Processing setup in the usual way (that is, unzip the file and place the results into the libraries folder of your Processing installation. You can find lots of walkthroughs for this procedure online; a nice one can be found here.

The AU library (AU stands for “Andrew’s Utilities”) contains 12 distinct sections, each intended to help you write shorter, cleaner, and more bug-free programs. The sections range from very simple (a single routine to flip a coin) to very powerful (generating equally-spaced points on multi-segment curves). The library is thoroughly documented with motivation, explanations, lots of pictures, and lots of complete examples with source code.

This beta release is meant to be a shakedown cruise. I’d love to have lots of people use this and help me make it even better before I formally release it.

Follow the break for a summary of the library’s contents.

These descriptions are adapted from Imaginary Institute Technical Note 3, “The AU Library,” available here. You can find much more information on everything here in that note, and also in the other Technical Notes available on that page.

CoinFlip-130-130Coin Flip: This is just a single little routine, meant to save you a bit of typing, and help make your intentions a little clearer. It just flips a fair coin. Half the time it returns true, the other half, false.

QuickBlend-182-130Quick Blends: It’s often useful to smoothly blend between two values. You might be blending the position of an object over time, or its shape based on where it is on the screen, or even its color. A good-looking blend usually starts out and ends slowly, so that the endpoints aren’t jarring. These routines offer fast and easy blends of this kind.

Choosing-500-130Choosing: Given a list of objects, select just one. You can attach weights to each object, which controls how likely it is that each object will be selected.

Distances-287-130Distances: The conventional Euclidean distance is a great workhorse, but this section offers a bunch of other ways to measure the distance between two points. You can uses these to write sketches that will work properly even if you change the size of your graphics window.

Easing-411-130

Easing: Easing is a general idea in animation that says that objects don’t suddenly lurch into motion from a standing position, and they don’t suddenly slam to a halt when they stop moving. Instead, objects need to pick up speed and then slow down. The easing section offers you a variety of simple and complex ways to change values over time. They can also be used for non-animation purposes, of course.

Waves-708-130Waves: This section provides you with a collection of repeating waves of different shapes. You can use them to create motion that repeats over time, or geometry that follows patterns on the screen.

AUShuffle-500-130AUShuffle: Given a list of objects, return them in randomized order. When they’ve all been returned, automatically shuffle the list again, so you can keep getting values. You’ll never get back the save value twice in a row, even after the values have been shuffled.

AUStepper-387-130

AUStepper: Animations often happen in phases: do this, then do this, then do that. Within each phase, it’s handy to know just how far along you’ve come. This section provides an object that lets you do handle this easily. You tell it how many phases you have and how long each one lasts. Then when you draw each frame, you ask it which step you’re currently on, and where you are in that step. That makes it easy to draw the proper image.

AUField-269-130AUField: We often want to manipulate 2D arrays of floats, whether to represent an image without being locked to just values from 0-255, or to represent some other information across the graphics window (or even just arbitrary 2D information). This object and its associated operations make it easy to work with this kind of data.

AUMultiField-269-130AUMultiField: AUFields, described above, are great for storing just one value per element, but what if we want to store and manipulate floats corresponding to a color image? This object packs multiple AUfields together, along with support routines. You can have as many fields as you like, but if you have at least 3, you can represent color images. There are many functions that work on any number of fields, but there are also a bunch that are designed specifically for treating 3 of the fields as RGB colors.

AUCamera-393-130AUCamera: Motion blur is an important visual cue in many animations. This section makes it very easy to create and combine multiple images for each frame of animation to produce a nicely motion-blurred image. You can choose from a variety of shutter styles to get just the kind of motion blur you like.

AUCurve-294-130AUCurve/AUBezier: We often want to create equally-spaced points along multi-element Catmull-Rom and Bézier curves. These objects let you do do that easily. You can optionally close the curves automatically if you want, creating a smooth and continuous result. You can attach as many other floating-point values as you like to each knot, and they will be smoothly interpolated along with the geometric information in the knots.

1 thought on “AU Library for Processing: The Beta Release!

  1. Pingback: The Joy of Easy Motion Blur | Imaginary Institute Blog

Leave a Reply

Your email address will not be published. Required fields are marked *