member since October 1, 2009

# portfolio of Dan Bernier

Proof-of-concept. Just takes some words, and animates them around the screen, fading them out gradually.

Each word stays on-screen for a length of time proportionate to its length. (Extra time for periods and commas.)

### Fractal Oscillating Rectangles

The idea: Start with a rectangle, and divide it in two - draw a line to mark the boundary. Now animate it: oscillate that line, and the proportions, back and forth. Now, recurse down into the two child rectangles, oscillating faster for more-nested rectangles.

Controls: move the mouse up & down to damp the oscillation. Press a key to change the render: instead of drawing lines, draw a dot at the center of where the lines would be.

### Star Words

Just the word "Star" 5 times, and you can move them around a bit to make star shapes. This is the sketch behind these pics: https://plus.google.com/108331224359319726955/posts/FAZgDTpsczD

### Too Many Browser Tabs Just Reopened

Ever have too many browser tabs open, and your machine has to reboot? And they ALL start spinning..

### Calming the Pistons

I wanted to try out 3D again. For some reason, I've been kind of afraid of the extra math - it's been a long while since my computer graphics class.

Mouse over parts of the sketch to calm the pistons. They move on a sine wave, and being close to the mouse damps the wave.

The color's not great - it looked better in Java mode - but it's close enough for now.

### Cantor Snowflake

Cantor's Set is the original fractal, in lines, and Cantor's Dust takes the idea to squares. This takes the idea to hexagons, which make snowflake patterns (with the Koch Snowflake inside!). Happy Christmas!

http://mathworld.wolfram.com/CantorSet.html
http://mathworld.wolfram.com/CantorDust.html

### smiley face

A simple image, meant to talk about information-as-computability. You can send this image to someone as a bitmap, or a sequence of instructions to re-create the bitmap. Which is better?

### exploring brain scans

Salvatore Iaconesi converted his medical records from proprietary formats to open ones, and has made it all available. He's asking us all to do something with it - anything from a game, to a cure.

Here's my first tiny contribution: I stacked his brain scans, so you can scroll through them.

Help out: http://artisopensource.net/cure/

### WordCram: U.S. Declaration Of Independence

For July 4, a WordCram from the United States' Declaration of Independence.

Fonts:
AveriaSerif-Regular (http://iotic.com/averia/)
Jane Austen (http://www.dafont.com/jane-austen.font)

### Arrange words with simulated annealing

An update of http://www.openprocessing.org/sketch/53214 but now with word shapes, using WordCram core classes. I think this shows that WordCram can use simulated annealing as a better layout/packing algorithm. Stay tuned!

### Hello! Worms

The worms spell out "hello!". Their paths are just long enough for the sketch to cycle every 12 seconds.

For the <a href="http://bus-tops.com/">Bus-Tops project</a>.

### Arrange circles with simulated annealing, #2

A much improved version of this one: http://openprocessing.org/visuals/?visualID=53004

It arranges them with simulated annealing. Each circle moves around a bit - more, if the temperature is high, and less, if the temperature is low. Smaller circles can move faster. The temperature is displayed as a transparent bar on the left.

Controls:
- click the mouse to reset, and change the way the temperature changes: asymptotic cooling, linear cooling, oscillating, or controlled by the mouse

### Anitya Bhavana, for BusTops

Based on <a href="http://openprocessing.org/visuals/?visualID=12948">this sketch</a>, this is a rendering of the Anitya Bhavana, for the <a href="http://bus-tops.com/">Bus-Tops project</a>.

As far as I can find, Anitya Bhavana translates into something like "a meditation on impermanence". When you're waiting for the bus, or riding it past a bus stop, impermanence is something you can identify with.

### Arrange circles with simulated annealing, #1

This sketch arranges circles along a diagonal - top-left (red) to bottom-right (blue).

It arranges them with simulated annealing. Each circle moves around a bit - more, if the temperature is high, and less, if the temperature is low. Smaller circles can move faster. The temperature is displayed as a transparent bar on the left, and currently oscillates between 0.4 and 1.0.

Controls:
- click the mouse to reset
- type a key to add more circles (too many will slow it down though)

### Colored letters grid

A lunch-time diversion, inspired by http://www.artransmatrix.com/images/sets/archive/resized/monument_an_adrien _frutiger_und_alliergi_e_boetti.jpg.

### Sum up to N

Illustrates why the sum of the numbers from 1 to N is equal to half N squared, plus half N.

Move the mouse left-to-right to change N. Click the mouse to toggle highlights on the "half-N" and "half-N-squared" parts.

### Graph demo

Simple: move the mouse from left to right, and the graphs will tell you how far you are.

### xkcd, Self-Description, Panel 1

I ran across an old xkcd yesterday (http://xkcd.com/688/), and wanted to generate it. Here's the first panel; maybe I'll add the rest.

It re-calculates the fraction on each frame, and stores it in the variable f. Click the mouse to reset f to 0, so you can watch it re-adjust.

### Anitya Bhavana: the Transitory Nature of Existence

As far as I can find, Anitya Bhavana translates into something like "a meditation on impermanence".

The text was given to me by my friend and yoga instructor, Elizabeth.

The Purisa font comes from the Thai Linux Working Group: http://www.wazu.jp/gallery/Fonts_Thai.html

What was in the morning is not at midday.
What was at midday is not in the afternoon.
What was in the afternoon is not at night.
What was at night is not at midnight.
For all things are tranisitory...

### Popular Baby Names WordCram

A WordCram of the most popular baby names. Click to re-start.

Names collected from http://www.census.gov/genealogy/names

Minya Nouvelle font from http://www.1001fonts.com/font_details.html?font_id=59

### US Constitution WordCram

A WordCram of the US Constitution. Click to re-start.

US Constitution text from http://www.usconstitution.net/const.txt

Liberation Serif font from RedHat: https://www.redhat.com/promo/fonts/

### OsCon Demo

this is JUST a demo :)

### Propane flame

Done with a basic particle system. The particles are drawn 5x20, which I think makes it look more realistic.

If you run the code, you can tweak particleAccDamp to control how wild or controlled the flame is, or tweak maxParticleAge to control the flame height.

### Lightbugs 3

'Lightbugs' is a series of sketches where 2D particles examine a hidden black-and-white image, moving towards the white parts. By controlling the contents of the image, you control the swarming patterns.

This sketch swarms to whatever key you typed. Type 'ENTER' to toggle whether the underlying image shows.

### Lightbugs 2

'Lightbugs' is a series of sketches where 2D particles examine a hidden black-and-white image, moving towards the white parts. By controlling the contents of the image, you control the swarming patterns.

This sketch animates a basic sine wave to prove out animation. Press the spacebar to toggle whether the underlying image shows.

### Lightbugs 1

'Lightbugs' is a series of sketches where 2D particles examine a hidden black-and-white image, moving towards the white parts. By controlling the contents of the image, you control the swarming patterns.

This sketch just uses static PNG files for the swarm patterns. Press the spacebar to toggle whether the underlying image shows. Click the mouse to cycle through some patterns.

Om image from http://www.yogaelements.com/blog/how-to-chant-om-correctly.html
Jolly Roger image from http://uts.cc.utexas.edu/~banks/index.html
Pirate fish image from http://www.virtualpirates.co.uk/misc.htm

### Toy sprite editor, with zoom

Featuring: a clunky color-picker, and mirror-drawing mode.

I was imagining a sprite editor with real-time preview, where you can draw on a zoomed-in canvas, and see the real-sized results at the same time.

### Stray Birds

"Stray birds of summer come to my window to sing and fly away. And yellow leaves of autumn, which have no songs, flutter and fall there with a sigh."

"O troupe of little vagrants of the world, leave your footprints in my words."

(http://www.sacred-texts.com/hin/tagore/strybrds.htm)

### cannons 3

This one adds slappers: basically, 3 walls hooked on a pivot point, that spins. For some reason, the slappers reveal a strange bug with the walls -- it looks like the bouncing of the shots needs to be, um, debounced (delayed).

cannons:
http://openprocessing.org/visuals/?visualID=6506

cannons 2: http://openprocessing.org/visuals/?visualID=6815

### cannons 2

This version adds walls that the shots can bounce off of. First, the collision detection, and second, the angle-of-reflection math were way harder for me to figure out than they should have been.

### flock

A flock simulation, based on the idea of local units following local rules. Each point follows the mouse, and avoids its neighbors. (Originally, they aimed for the average point location, the center of the flock, but following the mouse is more interesting.)

The knobs & dials are top in the code, so you can download and tweak it more than what's in the user controls. Try changing the # of flockers, the minimum-neighbor distance, or the acceleration damping.

Spacebar toggles a grid that follows the flock's focus, and a red line that traces one flocker. Clicking resets it.

### cannons

Work-in-progress. Tiny cannons that rotate their turrets and fire at pre-set points. There are also pits to collect the bullets. (My metaphors are all over the place: cannons? tanks? bullets? bouncers? Oh well.) I plan to add a few more kinds of object for interactions...if you have any ideas, I'd love to hear them. Or, if you're more ambitious, grab the code, add your own, and show me what you come up with.

Click anywhere on the sketch to reset the whole shebang.

### star maker

Controls:
The sketch maps mouseX to the number of points (left is low), and mouseY to the point length (down is low).

I was thinking about how I might make pointed-star shapes, and this is what I came up with. It draws a bunch of triangles at regular intervals, around a center. The base of each triangle overlaps the base of the others, making it look solid.

Click the mouse to toggle a transparent red border on the triangles, which better shows the layout.

### Spray paint stencils

Put some objects on white paper, and spray-paint them red. Remove the objects, and you have an outline of the object on the paper. This is a cheap simulation of that. Maybe someone will find the trick useful.

I was actually originally going for that effect where, to put text over an image, you surround the text with a contrasting color, to separate it from the image. Originally, my "background image" was just black, and the blur was red. I couldn't see the blur, though, so I dropped the black, and...

### Spray Brushes

Mimics a spray-paint brush (sort of). Move the mouse over the left half of the screen to control the paint flow: up and down controls how wide it sprays, left and right controls how much "paint" flows. Type any key to add more sprays. A "rolling canvas" captures what you've painted, on the right.

Riffing on Ira Greenberg's "Lines" chapter in http://www.amazon.com/Processing-Creative-Coding-Computational-Foundation/dp/159059617X/. (You can see it, if, in the sketch, you mouse all the way left.)

### Rainy image blurring

Grab a pixel from the image, draw a transparent ellipse somewhere nearby; repeat.

### Bezier editor

A while ago, I made this tool for understanding how bezier curves work. Drag the points around to get a feel for how they affect the curve.

Similar to http://www.openprocessing.org/visuals/?visualID=2123

### lerpColor mode

I wanted to see how mode affects lerpColor, so I threw together this experiment. Grab the code and try changing the colors it ranges over.
followed by
8
following
2

### collections and classrooms

submitted sketches to:
Bus-Tops: A Season Celebrating Processing
2D Simulations

### favorites

Share Subscribe to sketches