Arlington, MA
member since March 11, 2012
profile picture

portfolio of
Matthew Bernhardt

Player Combinations

This sketch generates a series of plots for the players on a soccer team, visualizing how much time each player spends on the field with his or her teammates.

For a full description, see

Brownian Motion 4 (colors)

A brownian motion simulation, with particle color and motion influenced by mouse position. Particles move when the mouse is clicked. Particle color gets lighter when the mouse is above the midline, and darker when below the midline. Horizontal position determines whether the color pushes towards red, green, or blue.

Lissajous Curve Generator (version 3)

A third iteration of a Lissajous curve generator. Click the sketch to clear the screen and re-draw with a new set of random seeds.

Mindstorms Motor Control Test -

A test of the interface of a motor control sketch.

The sketch will read the mouse's horizontal and vertical position. The horizontal position will become the target rotation for the motor, while the vertical position controls the power used to reach that target.

Lissajous Curve Generator (version 2)

This is a second iteration of the Lissajous Curve Generator (the original is at ). Changes for this version include the line gradually changing colors, centering the curve around the mouse position, and clearing the screen when the mouse button is clicked.

Blob Explorer

This sketch allows the user to explore an image using the blobDetection library. It defines two thresholds, derived from the mouse's X and Y position over an image.

The vertical position determines the darkness threshold for a blob to be detected (higher positions make for fewer blobs found, as they need to be very dark).

The horizontal threshold defines a minimum size for a blob to be highlighted (left positions are more permissive, allowing more blobs to be highlighted).

Mindstorms Remote Control

A control sketch that acts as a remote control for a vehicle design derived from the Jeep in David J. Perdue's Unofficial Inventors Guide

Lissajous Curve Generator

A quick sketch that generates a Lissajous Curve using two randomly selected numbers from 0-10. Press any key to stop the generation and save the curve as an image in your sketch folder.

Lego Mindstorms Range Plotter

A quick sketch that visualizes the value being returned by the ultrasonic sensor to a NXT 2.0 Mindstorms brick. Note that this sketch requires Jorge Cardoso's NXTComm library, and an active bluetooth connection to your Mindstorms set. Feedback would be great - I'm having problems getting a reliable connection over Bluetooth (works great when I do, but doesn't always happen)

NXTComm is available from

Video of this sketch in action can be seen at (in case you don't have a Mindstorms kit handy)

Particles, Springs, and Following

A simple sketch exploring the use of the Physics library by Jeffrey Traer Bernstein. Click the larger dot and the ring of smaller dots will follow. There are 20 in this version; careful motion can cause them to group and ungroup around the master dot.
followed by

collections and classrooms

not contributed to any collections or classrooms yet.


Share Share Subscribe to sketches