Logo by Pauldelbrot - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 25, 2024, 08:34:12 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: QUANTIZATION of arithmetic  (Read 3275 times)
0 Members and 1 Guest are viewing this topic.
Charleswehner
Guest
« on: November 14, 2006, 03:34:52 PM »

One of the most vexed questions to Fractalists is "is it an artefact"? (American English "artifact").

The arithmetic of calculators and computers is always quantized. The earliest processors, like the 4004, understood only four "bits". So they could count from zero to 15, and no further. Such chips are still made for pocket calculators, and tricks are used to extend the mathematics. For example, when incrementing beyond 15, one can use another register to count the overflows, which extends the nybble to a byte, and so on.

The fixed-point system I devised for my own fractals has twenty-four bits for the fractional part of the number and eight bits for the integer. This means that a quantum, or minimum "particle" of arithmetic, is one over 16777216. Is it adequate?

For a start, if one wants huge enlargements of the Mandelbrot (or other) set, the step-size is declining. When the step is smaller than the quantum, the system cannot advance. It stays stuck evaluating the same pixel over and over again. For example, 1 plus 0.001 is 1.001. 1.001 plus 0.001 is 1.002. However, if the step is 0.0000000001 and we only have three fractional places, we get 0.000 for the step, giving 1.000 followed by 1.000 over and over.

Beyond the question of the step is the question of the "formula" that goes inside the recursion loop. To what accuracy do we need to evaluate it?

Using my machine-code programs, I left the high precision for the stepping process, and limited the precision of the formula evaluation to see what might happen. I used a mask, which is a pattern of 1s and 0s that will either clear the individual bits or leave them unchanged.

For four-bit fractional precision, the mask is 0fff00000h. The leading zero is an assembly-language standard to let the assembler know that this is a number. The fs are the number 15, which is 1111 in binary. So the first two fs preserve the integer byte whilst the third f preserves only the top four bits of the fractional number, which is now quantized to 0, 1/16, 2/16, 3/16 and so on up to 15/16.

The mask is implemented in julia X and julia Y, as can be seen from the source program at http://wehner.org/tools/fractals/quantum/4man.asm

The result for the Mandelbrot set was this:


I then went on to make a degraded version of the image at http://wehner.org/tools/fractals/man/man8.gif , which is the "rosette" or eleven-branched spider's web. The code is at http://wehner.org/tools/fractals/quantum/4man8.asm . Here is the result:


WOW! What an amazing image!

I went on to extend the mathematics from four to eight bits. A quantum is now one part in 256. The complete Mandelbrot set was evaluated by means of http://wehner.org/tools/fractals/quantum/8man.asm - which differs only in that the mask is now 0ffff0000h
 (one more f).

Here is that result (from http://wehner.org/tools/fractals/quantum/8man.gif ):


It's looking good. However, what of the spider's web? Try http://wehner.org/tools/fractals/quantum/8man8.asm , which differs only in the begin X, begin Y and step sizes. It gives the following, which is http://wehner.org/tools/fractals/quantum/8man8.gif :


We have a patchwork quilt.

For my next trick, I extended the precision to sixteen bits, giving a quantum of one part in 65536. I used the prefix h, for hexadecimal, at http://wehner.org/tools/fractals/quantum/hman.asm . This gives http://wehner.org/tools/fractals/quantum/hman.gif as follows:


Superficially the same, yet it stands much greater enlargement as shown by http://wehner.org/tools/fractals/quantum/hman8.asm
 which gives http://wehner.org/tools/fractals/quantum/hman8.gif :


This is almost as good as the 24-bit version at http://wehner.org/tools/fractals/man/man8.gif .

ARITHMETIC WITH HOLES

Because we have a mask, we can disable some of the binary digits within the number, leaving the top and bottom as before. To understand this, consider decimal arithmetic that goes for 0 to 999, but has the middle digit disabled. Such crippled arithmetic can only understand units and hundreds. It would count like this:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 200, 201, 202, 203, &c.

The cycle 0 to 9 and back again is known as modular arithmetic. We would expect the units module to try to put some fine detail into a picture that is fundamentally degraded to the precision of the most significant part of the fraction. It is similar to putting a band-stop filter into a video signal line, or more accurately a band-stop for the line information and another for the field. Or even more elaborately, it is like the use of Walsh filter (the square-wave equivalent of sinusoidal filters). After all, there is fine detail (high frequencies) in the patchwork quilt above.

Anyway, I used http://wehner.org/tools/fractals/quantum/80cman8.asm to give eight bits of precision, followed by four "blind" bits and then twelve bits in the lower module. C is hexadecimal for 12. The result can be seen at http://wehner.org/tools/fractals/quantum/80cman8.gif or here:


Finally, I exchanged the 8 and the c to create a program that gives 12 bits of fractional precision and a module of eight bits. This source program is at http://wehner.org/tools/fractals/quantum/c08man8.asm and the result at http://wehner.org/tools/fractals/quantum/c08man8.gif
 


Whether these images speak to your aesthetic sensibilities or not, they are fact. That is what happens when the arithmetic is too crude, or when it has holes in it.

Some fractalists will take on board the message of this posting. They will be able to say that they are not guessing what the effects of mathematical precision/imprecision are, but have actually seen them on Fractal Forums. Others may find the "holy" mathematics - with holes in  - inspirational as a source of modern art.

The arty fact is that fractalism is not just a science but also an art. It could possibly even be a disease if it takes over your life.

Charles







Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.156 seconds with 21 queries. (Pretty URLs adds 0.009s, 2q)