u 1 , . . . , u r are in k[[x 1 , . . . , x s ]] with k and deg(u 1 , . . . , u r ) finite. Intending applications to Hilbert-Kunz theory, we code the numbers deg(u a 1 1 , . . . , u a r r ) into a function ϕ u , which empirically satisfies many functional equations related to "magnification by p," where p = char k. p-fractals, introduced here, formalize these ideas.In the first interesting case (r = 3, s = 2), the ϕ u are p-fractals. Our proof uses functions ϕ I attached to ideals I and square-free elements h of A = k [[x, y]]. The finiteness of the set of ideal classes in A/(h) and the existence of "magnification maps" on this set show the ϕ I to be p-fractals.We describe further functional equations coming from a theory of reflection maps on ideal classes, and the paper concludes with examples and open questions.