English: Here you can look at the fractals that the 3x + 1 problem creates (actually not only 3x, but also 2x and 1x). They are created according to a simple algorithm: 1. Find and add x and y of a pixel. 2. Find the modulus of the sum. 3. If the number is odd, then multiply by 3 and add 1. 4. If the number is even, then divide by 2 5. If the number does not become 1, then repeat the algorithm, starting from point 3 and add 1 to the number of iterations 6 Colorize the pixel the color farthest from 0 by the number of iterations divided by the contrast. 7. If it is not the rightmost pixel on the screen, then increase x by 1. 8. If it is the rightmost pixel on the screen, then decrease y by 1 and decrease x by -480. 9. Repeat Actions above 172800 times. The formula by which fractals are built is - x % 2 == 0 x=x/2 x % 2 != 0 x = nx + 1 . X - x + y pixels. You can change the n value and contrast. WATCH ONLY IN TURBO MODE!!! ------------------------------------------------------------------------- Русский: Здесь вы можете посмотреть на фракталы, которые создаёт задача 3x + 1(на самом деле не только 3x, но и 2x и 1x). Они создаются по простому алгоритму: 1. Найти и сложить x и y пикселя. 2. Найти модуль от суммы. 3. Если число нечтное, то умножиь на 3 и прибавить 1. 4. Если число чётное, то поделить на 2 5. Если число не стало 1, то повторить алгоритм, начиная с 3 пункта и прибавить 1 к количеству итераций 6 Раскрасить пиксель в цвет удалённый от 0 цвета на количество итераций, поделённых на контраст. 7. Если это не самый правый пиксель на экране, то увеличить x на 1. 8. Если это самый правый пиксель на экране, то уменьшить y на 1 и уменьшить x на -480. 9. Повторить Действия выше 172800 раз. Формула, по которой строятся фракталы - x % 2 == 0 x = x / 2 x % 2 != 0 x = nx + 1 . X - x + y пикселя. Вы можете менять значение n и контраст. СМОТРЕТЬ ТОЛЬКО В ТУРБО РЕЖИМЕ!!!