TITLE: Emergence of the discrete from the continuum
QUESTION [11 upvotes]: An almost eternal theme in Mathematics is the approximation of the Continuum by the Discrete. This core idea goes back at least to Archimedes, and remains active to these very days (and quite likely for the next thousand years) .
You have a continuous structure, say a sphere, and you approximate it as the limit of a series of discrete objects, say polyhedra.
I do not need to provide more examples, I am sure you all have plenty.
But, there is also, though by no means so prominent, a reverse direction.
I am not able to date  precisely when it made its debut in the history of mathematics, but it most certainly appears in the revolutionary work of Fourier: take a discrete function, say the Heaviside step function, and approximate it via series of trigonometric functions:

So, here a discrete object is realized as a limit of continuous ones (in this case smooth functions).
I am especially intrigued by this possibility, which, pushed to the extreme, will depict a mathematical world where the Discrete is an emergent phenomenon, out of a  Continuum
Thus I ask to everybody:

can you list active research in the way of approximating discrete structures via smooth ones?

For instance, a polyhedron via a series of smooth manifolds, or examples in analytic number theory, or patterns in finite combinatorics out of .....(fill the dots)  .
Any thoughtful and possibly well documented answer will get my vote, regardless  the domain chosen (in fact, the more examples I will harvest from heterogeneous disciplines, the happier I shall be).
On the other hand, to get the GREEN the stakes are higher: rather than single examples, a sketch of a general perspective on the Discrete as emerging from the Continuum
ADDENDUM: As pointed out by Andreas Blass, I have implicitly conflated two themes here:

discrete as limit of the continuum
emergence of the discrete from some background

Point 2) does not seem to necessarily imply point 1) and probably the same applies the other way around. Which one I am interested in? Easy: BOTH OF THEM.
But now that Andreas has already marked this point, the GREEN ANSWER would be, perhaps, a clarification on the relationship between  1 and 2 (inter alia)

REPLY [5 votes]: Bill Lawvere has, for a long time now, promoted the idea that the discrete emerges as a limiting case by abstracting from the continuous. At the most general level, this manifests in the distinction between cohesive and constant (i.e. abstract) toposes of sets:
Quantifiers and Sheaves, Continuously Variable Sets, Variable Quantities and Variable Structures in Topoi, Toward the Description in a Smooth Topos of the Dynamically Possible Motions and Deformations of a Continuous Body, Cohesive Toposes and Cantor's 'lauter Einsen', etc...
This line of thought is worked out more precisely with the concept of Axiomatic Cohesion wherein, roughly speaking, a topos $\mathscr{E}$ is exhibited as cohesive relative to a base topos $\mathscr{S}$ via a string of adjoints between them describing how the discrete spaces $X \in \mathscr{S}$ sit inside the larger topos $\mathscr{E}$ of more general (cohesive, combinatorial, etc...) spaces. Lawvere gave some lectures on this topic in Como in 2008 and there are accompanying lecture notes. The nLab page for cohesive toposes is also quite helpful.
To bring things back down to earth a little bit, in Left and Right Adjoint Operations on Spaces and Data Types, he descirbes, in the last section, the following situation.
Suppose we have, in a cartesian closed category $\mathscr{C}$, a commutative ring object $R$ which we regard as the 'one-dimensional continuum'. We can form the correspinding 'complex numbers' ring $C = R[i]$ by defining complex multiplication on $R^2$ in the usual way. Inside of $C$ sits the multiplicative subgroup $S^1$ corresponding to the 'circle'. Finally, since we are in a cartesian closed category, we can extract from the map space $(S^1)^{(S^1)}$ the subspace $Z$ of those endomorphisms of $S^1$ which are group homomorphisms. This $Z$ can therefore be regarded as the 'integers' although it is important to note that it will not necessarily be the usual integers object $N[-1]$ derived from a natural numbers object $N$ in $\mathscr{C}$.