Applied Discrete Differential Geometry in Houdini #1: Curvature Flow
Prof. Keenan Crane posted lectures on his Discrete Differential Geometry course on YouTube, and his lecture notes can also be found directly on his course’s website.
Link dumps here:
Applied mathematics in Houdini is a topic I’ve been wanting to learn for a while, and would like to see if any of these experiments would ever have any value in production, or if there is already existing functionality.
Computer graphics is still a black box to me, and I still find it cool how much knowledge is applied into designing any 3D software. And especially how every simple operation in 3D is accessible to the artist, far removed from the theory.
Going into this lecture the term “Discrete Differential Geometry” excited me, but I wasn’t clear on what value it would provide to me as an artist. I still don’t know. I often enjoyed classes on theory, but struggle to make connections to application.
To break down the terminology:
Discrete - Fixed quantities. This is as opposed to infinitely continuous. Directly translating to computer graphics, an example of discrete geometry is polygonal modeling. Any 3D model defined by points with a mesh is discretely defined. The opposite would be a NURBs curve/surface, or anything that is parametrized.
Differential - Relates to infinitesimals. When we calculate the rate at which things change, with respect to space or time, we sample over extremely small partitions to make inferences at a global level.
A lot of the techniques described in this class are broadly applicable as it is a toolbox and language that broadly describes all sorts of applications in any field that requires analysis of discrete data, in which computer graphics is a small piece of this puzzle.
The first lecture described the high level of the course. In general, we are trying to quantify and extract properties from discrete data, which is a large part of working in 3D! And the more properties we can work with and animate with a given system, the more potential for interesting animation and animation tools.
In a perfect world, we would have infinite resolution for everything. We could either define an image or geometry in a scene with an intuitive, perfect equation for a parametrized surface. Or, in the discrete world, we would have an infinite number of points so that we could capture every nook and cranny of a 3D model (with the assumption that realism is the artistic goal).
But! We have to approximate to save time in the discrete world, and not every mathematical model is solvable from an analytic perspective, where the answer is input x parameters to spit out y.
Prof. Crane expressly describes two main distinctions here: The idealized continuous world vs. the approximated discrete world.
Let’s work within the context of a curve. These definitions are my personal definitions in my head and are in no means rigorous:
Continuous: When a curve from beginning to end (without repetition) can be parametrized from t = [0,1).
Discrete: In contrast, a discrete curve is equivalent to the above when it is sampled with n points, where the points are connected by n-1 line segments.
Given our mathematical tools, we can take differentials and apply them to the continuous curve to get several properties of the curve, such as curvature, velocity, tangent/bitangent vectors along any point of the curve.
We can get an equivalent definition in the discrete world, but as described in the lecture, one model sacrifices properties that another model can capture better.
In this section, there is one application related to curves described as curvature flow. In the last section of this series, will always be some attempt of the theory into application.
Curvature flow is an iterable algorithm that aims to reduce the curvature of a given closed curve over time. Given an infinite number of iterations, this will always lead to a circle.
Easily, we can identify the parts that are relevant to implementation - iterable and operates on the previous step leads to using a solver.
Here is my node structure and attempt: