Virtual Duck Pond

The Whitman College duck pond is one of the most beautiful and relaxing places on campus.

Imagine if you could become a duck for a few minutes and glide gracefully across the water quacking to your flock mates to encourage them to follow you. I coded this demo for my Computer Graphics class as an example of how motion-tracking and floor projection can realize this fanciful scenario. I adapted the P5JS version of Craig Reynold’s Boids flocking algorithm so that the virtual ducks would follow the position of your virtual duck. Move your duck by walking with the rigid cluster of reflective marker dots.  The flocking algorithm computes the combined propulsion force for each duck that balances the flock’s desire to stay together and each duck’s desire to follow your duck if you are nearby. The score keeps track of how many ducks are following you. The quacking sound gets louder when ten or more ducks follow you. I wrote C++ code to stream the Vicon marker tracking data to the virtual duck pond demo, which was coded in JavaScript.

This video was made in the temporary basement lab in Fall 2021 with the single short-throw (0.5:1) projector on a tripod casting the virtual duck pond image onto the floor. The new lab will install multiple overhead projectors to more effectively reduce shadows.

Credits

flocking algorithm adapted from P5JS demo

ducks quacking sound clip

Whitman duck pond article with pictures

Next – Molecular Visualization