Earlier this week, I ventured into a beautiful blizzard with a friend to go sledding and skiing at President’s Lawn, Tufts University. Here are the resulting video and photos, including shots of the amazing Tufts Ski Team:
Videography
Functional Video Generation
Back in 2011–2012, I played around with generating static images from mathematical functions. Each function effectively took an (x,y) coordinate and returned an RGB tuple. (By mathematical functions, I mean deterministic functions that don’t rely on external input and have no side effects. I.e., given the same input parameters, the function will always return the same value, and do nothing other than return that value.) Some scaffolding code called the function repeatedly and performed anti‐aliasing to produce an image. It was fun to see what I could do just by mapping spatial coordinates to color values.
Then earlier this year, I decided to add a time coordinate and make abstract, ambient videos using the same technique. The single‐threaded python code I used for still images was too slow to be practical for long videos, so I started from scratch with new C++ code and an improved interface. The video scaffolding code exposes the below interface for subclasses to define what the video will look like. (The use of ThreadState
and TimeState
does make the functional abstraction a bit less pure, but it’s important for performance to not re‐do some calculations for every sub‐pixel.) Once a subclass gives a function that defines what the video looks like in theory, the scaffolding code handles anti‐aliasing, motion blur, and rendering to turn it into a finite video that a computer can display.
// Main class to generate a video (or still frame). Subclass this. Use
// ThreadState for any information local to a thread, and TimeState for
// anything local to a single point in time. (There could be multiple
// TimeStates per frame if temporal oversampling is used.)
template <typename ThreadState = NullState, typename TimeState = NullState>
class VideoGenerator : public VideoGeneratorInterface {
…
protected:
// Get the color value at a single point in space and time. (x,y) are spatial
// coordinates, with the smaller dimension in the range [-1,1]. For a 2:1
// aspect ratio, x would be in the range [-2,2] and y in [-1,1]; for 1:2, x
// would be in [-1,1] and y in [-2,2]. t is in seconds.
virtual Rgb PointValue(
const ThreadState* thread_state, const TimeState* time_state,
float x, float y, double t) = 0;
// Override this if the per-thread state shouldn't be null.
virtual ::std::unique_ptr<ThreadState> GetThreadState() {
return nullptr;
}
// Override this if the per-point-in-time state shouldn't be null.
virtual ::std::unique_ptr<TimeState> GetTimeState(
const ThreadState* thread_state, double t) {
return nullptr;
}
…
};
The first video I made was directly inspired by the last still image I’d made with the technique, and used a very similar function. For each time value t, three dimensional Perlin noise provides a map from (x,y,t) to a value that I used as the elevation of the (x,y) point on a topographic map. The elevation values are then used to make contour lines with hue denoting the elevation of the line and lightness denoting how close each point is to its nearest contour line. The code is only 43 lines long including boilerplate, and produces this 12 hour long video of gently moving colorful curves:
Next, I played around with interference patterns similar to moiré patterns, to try to generate something even more abstract than an abstracted topographic map. This code uses a set of overlapping, moving blinds to generate patterns of light and dark. The blinds use Perlin noise to independently vary their size and rotation, and to move side to side. Separately, the hue for the entire screen varies over time. Warning: the end result might cause motion sickness in some people. I tried my best to avoid it, but I’m not sure how well I succeeded.
So far, I’m finding the results of functional video generation interesting, though I do think that more traditional computer animation is a lot more versatile.
Exponential Vuvuzelas Release
If you’re the type of person who always felt that your music collection just needed a few (hundred) more vuvuzelas, then today, you are in luck! Presenting a complete recording of Exponential Vuvuzelas, available for audio download and music video streaming today!
- Exponential Vuvuzelas: Act 1, Crescendo: N. 1 Vuvuzela
- Exponential Vuvuzelas: Act 1, Crescendo: I. 2 Vuvuzelas
- Exponential Vuvuzelas: Act 1, Crescendo: II. 4 Vuvuzelas
- Exponential Vuvuzelas: Act 1, Crescendo: III. 8 Vuvuzelas
- Exponential Vuvuzelas: Act 1, Crescendo: IV. 16 Vuvuzelas
- Exponential Vuvuzelas: Act 1, Crescendo: V. 32 Vuvuzelas
- Exponential Vuvuzelas: Act 1, Crescendo: VI. 64 Vuvuzelas
- Exponential Vuvuzelas: Act 1, Crescendo: VII. 128 Vuvuzelas
- Exponential Vuvuzelas: Act 1, Crescendo: VIII. 256 Vuvuzelas
- Exponential Vuvuzelas: Act 1, Crescendo: IX. 512 Vuvuzelas
- Exponential Vuvuzelas: Act 1, Crescendo: X. 1024 Vuvuzelas
- Exponential Vuvuzelas: Act 2, Diminuendo: I. 1024–0 Vuvuzelas: “Outro”
- Exponential Vuvuzelas: Act 2, Diminuendo: N. 0 Vuvuzelas: “A much needed break for your ears”
- Bonus! All 37 Samples From Exponential Vuvuzelas, for Your Listening Agony
In addition to the music and videos, there’s also a score of the composition, the code used to turn 37 vuvuzela samples into 1024 simultaneous vuvuzelas, and the code used to generate the visual part of the music videos.
Bailey at the Beach
Despite the post date, this is not an April Fools Day post. But it does come with a video of Bailey.
New Brunswick and PEI
During time off between two jobs, I decided to head towards New Brunswick, Canada and see where I ended up from there.
2016-05-09
I spent most of the day driving up to my first stop, Woodstock, NB. On the way, I had a pleasant surprise view of Katahdin from right off of I-95.
2016-05-10
My morning walk around Woodstock was pleasantly cold and windy.
During the afternoon, I drove around, looking for interesting sights or places to hike. At one point, there was a sign for a “Unique Area.” I tried to go there, but got stopped by a flooded road.
In the evening, I took another walk around Woodstock.
2016-05-11
I’d heard some good things about Prince Edward Island, so I decided to head there next. Along the way, I saw a pretty flood plain, so I stopped to stretch my legs and get a couple of pictures.
Next stop was Cape Jourimain National Wildlife Area, on the New Brunswick side of the really long bridge between New Brunswick and PEI. I even made a video to try to show how long Confederation Bridge is.
After some driving around looking for a place to stay in PEI, I settled on Charlottetown, the capital and largest city.
2016-05-12
I spent the morning walking around town and seeing the art museum, then eating a delicious lunch of local mussels.
Then, on to the coast. (And I took a video of one of the beaches.)
2016-05-13
There was a bit more I would have liked to do in PEI, but I decided that I wanted to start heading in the general direction of home. So I drove towards Fundy National Park, NB. But first, a stop along the way to see more PEI red sand.
Then one last stop in PEI, just before crossing the bridge.
I had heard good things about The Rocks Provincial Park on the Fundy coast of New Brunswick, so I stopped there along the way too.
Then I saw Lars Larsen Marsh, so I stopped there briefly.
Eventually I made it to Alma, NB just outside of Fundy National Park. I found a place to sleep and a place to eat dinner. The place to eat dinner had a pretty sunset.
2016-05-14
In the morning, I headed to the park and had a nice but eventually too slippery hike in the rain. Near the trailhead, I got a video of Herring Cove Waterfall. Fundy National Park was gorgeous.
After a good seafood lunch, I explored the area some more. The first stop was Waterside Beach.
Then a quick stop along the way to Cape Enrage, because the rocks and fog were pretty.
And Cape Enrage itself, which turned out to be not very exciting in the fog. The wind was nice though.
Some of my exploring took me on pretty steep roads, so I ended up spending a fair amount of time going downhill in first or second gear. After a little while, I decided to give my car a chance to cool off while I walked around a cemetery.
Next stop was Point Wolfe.
Then Laverty Lake. The lake was quiet and pretty, and the lighting was wonderful. I would have liked to spend more time there, but unfortunately there were also a lot of small flying biting insects, so I left quickly.
2016-05-15
I took a short walk around town in the morning, then got in the car to start the long drive home.
My last stop before returning stateside was an island that becomes a peninsula at low tide.
NEFFA
The NEFFA Festival was quite enjoyable. Here are some videos:
- Contra Dance at NEFFA 2013 (1)
- Contra Dance at NEFFA 2013 (2)
- Waltz at NEFFA 2013 (3)
- Rapper at NEFFA 2013 (4)
- Rapper at NEFFA 2013 (5)
- Contra Dance at NEFFA 2013 (6)
- Four-Facing-Four at NEFFA 2013 (7)
- Jamming and Singing at NEFFA 2013 (8)
And photos:
The Flurry
The Flurry was fun. I took videos of a swing dance and a contra dance and some photos: