We think we know what shapes are, right? Maybe you think of squares, circles, ovals? But nothing in nature has these shapes, even away from the atomic scale. Dolphins are not made of spheres and cubes. Eggs are not ellipses. And yet I want my computer to understand the shapes of dolphins, eggs, human hands, coffee cups, everything. I will talk about how we are resolving these questions using piecewise functions: mathematical tools which look more like computer programs than they do the 18th century mathematics of Taylor and Fourier. Because they look like programs, they are simple to understand, and simple to use in computer graphics, but are somewhat tricky to deal with mathematically, so that only recently have we begun to have success in applying them in computer vision and machine learning. I will show how statistical concepts that have traditionally been brought to bear on the analysis of shape need to be modified to deal with these piecewise functions, and that even simple concepts like principal components analysis need to be carefully reformulated in order to make use of these powerful tools. Applications from dolphin modelling to hand tracking will guide this tutorial, and although there will be mathematics, even quite rusty A-level maths should be fine.