toxi.in.process

Tuesday, January 27, 2004

progress bar for applet loading

just came across some special <param> tags used by Sun's Java browser plug-in, one of which enables a (configurable) progressbar shown while the applet is still loading. simply add this inside the <applet> tag in the exported html file:

<param name="progressbar" value="true"/>

<param name="progresscolor" value="#000000"/>

more info and various other options can be found on this page
again, this is only available for users with a recent java plugin. the default Microsoft JVM used by IE will ignore these settings.

Friday, January 16, 2004

new demos

uploaded 2 older demos demonstrating different techniques:

Cicular buffering
this demo uses 16 offscreen buffers which are used as subframes of a looping, but constantly changing animation. The animation consist of 1 particle whose position is interpolating to the current mouse position. Because the screenbuffer is never cleared, the technique creates a growing number of moving objects without an ever loss in performance or increase in cost of computing those.

Perlin noise realtime dithering
a very simple pattern based dithering, based on the perlin noise function, is used to translate a shaded image into a dithered black&white image. By adjusting parameters of the noise function, the visual character can be varied between using dots and stipes.

Friday, January 09, 2004

Java tutorials

Just came across some great learning resources, tutorials for various languages and levels over at Dick Baldwin's website. Great stuff!

Wednesday, January 07, 2004

PostScript output from Processing

Amoeba man, Marius Watz, has started writing some nifty utility class to generate PostScript files from within Processing, looks very promising. The SimplePostScript project homepage is here.

UPDATE: here's some demo output [1, 2] for printing, generated by this little Processing gem

Tuesday, January 06, 2004

Sonia v2.5

Amit Pitaru just released the latest version of his audio library Sonia for use with Processing. Internally, Sonia is building on the JSyn classes/plugin, which provide x-platform, native access to the system's audio architecture and allow for low latency audio applications, compared to the default Java API.

Monday, January 05, 2004

Floats vs. fixed point math

Just posting links to a few older bits I wrote, which might be helpful to know when you're trying to speed up your sketches. This one is about using fixed precision numbers instead of floats. Here's also more general comparision of number types and different algebra modes

Automatic keyboard focus

In response to an email I've got asking about forcing an applet to obtain the keyboard focus when it launches, here's a code snippet to do just this:

boolean needsFocus=true;


void loop() {
// request focus from the system until received, but only do it once
if (needsFocus) {
if (!this.hasFocus()) {
this.requestFocus();
} else
needsFocus = false;
}
// your normal code goes here...
.
.
.
}