Year
Apr 2024
Client
Personal Project
Year
Apr 2024
Client
Personal Project
Visualization of the mathematical concept of perfect numbers through a vibrant mosaic of interlocking forms. A perfect number is deffined as a positive integer equal to the sum of its proper positive divisors, which are all the positive divisors of the number excluding itself. Each number is represented with a color from a palette inspired by the intricate tilework of the Alhambra, reflecting its proximity to perfection. The geometric arrangement reveals subtle patterns that emerge naturally from the numerical relationships, creating a harmonious yet dynamic composition. The interplay of greens, blues, and yellows evokes a sense of both mathematical precision and artistic beauty, inviting viewers to contemplate the hidden order behind the numbers while appreciating the aesthetic depth of the visualization.
To start, we assign the color of each number by summing all the divisors of the number except the number itself. We then scale each result so that the largest number in the image is 255 to make sure the whole range of numbers is visible and patterns already start to emerge.
In = sum(divisors(n))
In = sum(divisors(n))*(255/max(I))
In order to know if each number is perfect we compute the difference between each number and the sum of its divisors to see how close it is from being a perfect number. Since smaller numbers will yield to smaller differences we divide the difference between the divisors and n by the number itself, so now we can see how close they are to being perfect in relation to themselves.
In=|sum(divisors(n))*(255/max(I)) - n|
In=|sum(divisors(n))*(255/max(I)) - n|/n
At this point we have a visualization that gives us a pretty good understanding of how close each number is to being a perfect number, now we only need to add some color to it. We generate a palette inspired in the mosaics of Alhambra with some azure blues, emeral greens, earthy browns, golden yellows and earthy reds and apply it to each pixel based on its grayscale value.
Color palette
For some final processing we add some noise, wall crack textures and subtle 3D effect to simulate tile work.
Perfect Numbers