Everything

Programming Side Projects Music Art Animation Blog Everything

Programming

GLSL Autodiff

August 13, 2021

Tired of doing math to get normals in your vertex shader? Same. Use this library to write your function once and generate derivatives automatically!

Sometimes, I want to displace mesh vertices in a vertex shader. After doing this, the normals of a surface should change. However, per-vertex normals don't automatically update! Manual updating of vertex normals requires you to take the derivative of your displacement function. This library automates that process so that it takes less time and is less prone to user error.

StrokeStrip: Joint Parameterization and Fitting of Stroke Clusters

Written in collaboration with Chenxi Liu, Nicholas Vining, Mikhail Bessmeltsev and Alla Sheffer.

ACM Transactions on Graphics, August 1, 2021

Artist-drawn vector sketches use clusters of strokes to convey intended curves. StrokeStrip fits intended curves to such clusters by computing and utilizing a joint arc length parameterization of each cluster, producing clean lines consistent with viewer expectations.

We observe that viewers perceive stroke clusters as continuous, varying-width strips whose paths are described by the intended curves. An arc length parameterization of these strips defines a natural mapping from a strip to its path. We therefore recast the curve fitting problem as one of parameterizing the cluster strokes using a joint 1D parameterization that is the restriction of the natural arc length parameterization of this strip to the strokes in the cluster.

Differentiable Shadow Rendering

Written in collaboration with Jerry Yin.

April 14, 2020

We propose a differentiable formulation for soft shadows, allowing optimization of rendered images that include soft shadows with respect to scene parameters.

Our implementation enables applications such as optimizing a model with respect to its shadow. An example task motivating this work is the algorithmic generation of shadow art, in which a 3D shape produces different artist- specified shadow shapes when lit from different angles. An example of shadow art can be found on the cover of the book Gödel, Escher, Bach. Our goal is to find a reasonable tradeoff in this optimization task between visual quality and performance.

Locomotion of Boneless Creatures with Distributed Control

Written in collaboration with Tim Straubinger.

April 14, 2020

We are interested in exploring how plausible it is to control creatures whose bodies contain muscle and no bone.

Given various elastic and deformable body plans, we would like to see what gaits emerge based on body shape and body material properties. Through experimentation, we comment on the effectiveness of genetic optimization over policy gradient optimization, and the expressive capability of local controllers with limited views of the world compared to single, comprehensive controllers.

More Programming

Side Projects

Glitchy Birds

December 15, 2021

Some bird drawings, Frankensteined together into glitchy creations

The Golem of Prague

November 23, 2021

A generative cover for the classic Golem tale

Rough Forest: Generative Album Art

November 19, 2021

Generative art for an album, with accompanying generative titles

Exponentially Tiled Fish and Birds

November 5, 2021

A spiral-tiled reimagining of Escher's Sky and Water I

More Side Projects

Music

She Answered The Trees

November 19, 2021

A mashup of a few genres, centered around some ukulele

Limits

January 16, 2021

Channeling stress into dance music, inspired by Remain In Light.

Motion Blur

March 29, 2020

Reflections on quarantine distilled into a small EP.

More Music

Art

Desk Dino

April 30, 2021

I have this plastic dinosaur on my desk. I drew it out in the wild.

Hourly Comics

February 2, 2021

Made for #hourlycomicday 2021

Swirled Series

November 8, 2020

Looping animations starting and ending on a checkerboard

Views from Vancouver

October 3, 2020

I recently moved to Vancouver and have drawn a number of sights.

More Art

Animation

Adrift

August 16, 2020

A meditation on feeling isolated, counting down to something different.

Get Back to Work

April 18, 2019

A vignette about daydreaming when you have work to do.

Spring

May 4, 2017

A vignette about the changing of seasons.

On Privacy and Encryption

March 8, 2017

A video essay about why we shouldn't build backdoors into our encryption

More Animation

Blog

Flood Fill in Blender Grease Pencil

May 1, 2022

How the fill bucket tool in Blender works and how I tried to make it a little better.

Depth of field in p5.js

October 3, 2021

Let's add some blur to p5 WebGL mode!

Deforming 3D shapes in real time, for the algebraically challenged

August 1, 2021

A recent rabbit hole I went down: how do you deform and distort arbitrary 3D shapes in real time and still have useable normals without having to do a bunch of derivatives by hand?

Why does dappled light look like that?

May 8, 2021

A bit about how lighting works. Tl;dr: it's a bunch of pinhole cameras.

More Blog