I love that David shares things like this.
It's good for people to see, that with as much as great developers like David are able to achieve, there are still things that trip you up.
Spent the morning immersed in math I only half understand, trying to find the xy-points along a rounded rectangle. Got there in the end through the “brute force” method of just trying different things until it finally works; after completely failing to solve it theoretically.