Something that's beautiful in its problem set (doesn't, for instance, act as glue between other, poorly designed systems and thereby reflect their flaws), beautiful in its solutions (doesn't solve too much, nor too little, doesn't make too many assumptions), beautiful in its use (user experience, performance, etc.), and beautiful in its implementation (quality under the hood, no accidental complexity, properly factored, easy to understand and maintain) is quite rare for any problem with a scope larger than say "cat", and even most programs of that size make sad assumptions about things (e.g. are in languages where things are type/memory safe as a practice of the authors' diligence, not verifiable as a matter of course) or have to reflect the complexity of the OS/machines they run on for various reasons (performance, security, etc.).
One off the top of my head is Abrash's perspective correct rasterizer for the original Quake. Come to think of it, the BSP+PVS system for visible surface determination that they used was also pretty amazing.
Something that's beautiful in its problem set (doesn't, for instance, act as glue between other, poorly designed systems and thereby reflect their flaws), beautiful in its solutions (doesn't solve too much, nor too little, doesn't make too many assumptions), beautiful in its use (user experience, performance, etc.), and beautiful in its implementation (quality under the hood, no accidental complexity, properly factored, easy to understand and maintain) is quite rare for any problem with a scope larger than say "cat", and even most programs of that size make sad assumptions about things (e.g. are in languages where things are type/memory safe as a practice of the authors' diligence, not verifiable as a matter of course) or have to reflect the complexity of the OS/machines they run on for various reasons (performance, security, etc.).