Fractals-Wonders of Mathematical Geometry

My best, and very likely one of the smallest fractal graphics programs ever, an assembly language IFS fractal generator.  Welcome to Fractal Origami...

SiteMap of SciRealm | About John | Send email to John
John's Science, Math, Philosophy Stuff:
The Science Realm: John's Virtual Sci-Tech Universe
| 4-Vectors | Ambigrams | Antipodes | Covert Ops Fragments | Cyrillic Projector | Forced Induction (Sums Of Powers Of Integers) | Frontiers | IFS Fractals | JavaScript Graphics | JavaScript Graphics Using Table | Kid Science | Kryptos | Photography | Prime Sieve | QM from SR | QM from SR-Simple RoadMap | Quantum Phase | Quotes | RuneQuest Cipher Challenge | Secret Codes & Ciphers | Scientific Calculator | Science+Math | Sci-Pan Pantheist Poems | Stereograms | Turkish Grammar

Welcome to Quantum Reality: Virtual worlds of imaginary particles: The dreams stuff is made of: Life, the eternal ghost in the machine...
This site is dedicated to the quest for knowledge and wisdom, through science, mathematics, philosophy, invention, and technology. 
May the treasures buried herein spark the fires of imagination like the twinkling jewels of celestial light crowning the midnight sky...

Quantum Mechanics is derivable from Special Relativity
See QM from SR-Simple RoadMap

***Learn, Discover, Explore***

Melike Wilson Art

Site last modified: 2015-Apr-25

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ???
(2-map,histogram) fractal by FractalOrigami

Here is one of my old DOS fractal programs, written in style of the good ole days, when computer programs were still small: Assembly language!

It generates Random 1, 2, 3, or 4-Map IFS "Iterated Function System" Fractals, which have the property of self-similarity on different size scales.

It uses integer mathematics for high calculation speed. Please read the commands below before running...

Download this to run Fractal Origami

** **
for the long filename running natively
on a working Windows system

** **
for the old 8.3 DOS style filename

890 bytes!

You may need to download the following program to allow old DOS programs to run on your computer:

DOS Box - Download page

I've used DOS Box sucessfully for:
Windows operating systems where it said, "Heck no, I'm not gonna run your ancient DOS program..."
Video cards (i.e. laptops & flatscreens), where it said, "You want me to display what video mode?!?"

There are also DOS Box versions for other operating systems, such as Linux and Mac OS

I did the following to make it work in DOS Box
Save the program to a directory under C: drive  {  C:\OldProgs   }
Install the DOS Box program

Run the DOS Box program

Use the following commands in DOS Box:
Z:\>Mount C C:\OldProgs

Yes, that's right: not gigabytes, not megabytes, not even kilobytes, just a few hundred bytes!
An awesome DOS {.com} "tiny" model assembly language program!
Pretty cool, huh! - Fractals in math language speak via computers in assembly language!

This is the entire program...    890bytes    :-)

I keep making alterations to decrease program size and additions to increase functionality, but I will try to keep it under 1 KB.
So far, it seems to work fine on the Win98,Win2000,WinME,WinXP systems I have tried it on, although the screen reset seems very slow on certain systems. Please let me know if it gives any trouble on your system. I may try to make it into a Windows screen-saver eventually; let me know if you all want any other features in it.  ** Note** If it doesn't run natively on your system due to operating system conflict or video mode conflict, see the "DOS Box" emulator program shown above.

The program's initial screen is simply a splash screen about my website. Press any key to get to the fractals. The first one is the Serpinski Triangle. You start out in 3-map, histogram color mode.

Program Commands:
[r]andom fractal : draws a new, random fractal with the current number of maps
[l]inear fractal : draws a new, random fractal with the current number of maps, and using some linear constraints on the parameters
[n]ear-by fractal : draws a near-by, random fractal with the current number of maps
[s]peck/skew/serpinski/square : draws either the Speck (1-map), Skew-Line (2-map), the Serpinski-Triangle (3-map), or the Square-Four (4-map) fractal
[c]ycle color mode : cycle between 4 different coloring modes
[1],[2],[3],[4] map mode : choose between 1, 2, 3, or 4 map fractal - does not change the fractal maps, just the number used, also used to redraw screen
[q]uit or [Esc] : stop program and back to system...
{mouse commands} - are you kidding?, I want something under 1KB.

The commands only use lowercase letters, make sure caps-lock is OFF. Hey, don't complain; this is assembly, every byte counts.
The initial screen is my splash/ad for the SciRealm website... Commit this screen to memory, then press any key to go to the fractals... ;-)
Press [r]andom to get a different, random fractal. Often these are diffuse in high map modes.
Press [l]inear to get a different, random, linear parameter fractal - usually well defined in all modes.
Press [n]ear-by to get a near-by fractal, one with similar parameters to the current one. Usually very interesting after doing a linear fractal.
Press [s]erpenski to get a special case of the linear fractals.
Press [c]olor modes to cycle from:
(1) fade-in histogram (indicates frequency count), my favorite usually
(2) ice-crystal shimmer (all points shimmer randomly), the brightest, most active one
(3) map-color (indicates the level-1 attractor maps)
(4) many-color (indicates the level-2 'sub'-attractor maps)
and back...
Press [1], [2], [3], and [4] map modes to show fractals with that number of maps. This also allows one to see the effect of adding/subtracting a map to/from a given set. Generally, 2-map fractals tend to be well-defined, 4-map fractals tend to be quite cloudy/diffuse,3-map fractals seem to be a good compromise.
I don't think the 1-map should ever give anything other than a single point, but the program occasionally shows something interesting, so I am leaving in the option. This may be an artifact of the integer math used on what should be a continuous system. The 2-map also gives a suspicious results sometimes. These number options may also be used to redraw the same fractal, if you always push the same number, for instance to observe different color effects.

Instructions and comments:
Sit back, put on some good music, and enjoy pure mathematical art. These things prove that the mathematical Platonic realm exists! ;-)

Some of the things you may see (or things that I have seen, anyway):
clouds, rain, lightning, storms, rainbow splashes
leaves, trees, flowers, forests, pine needles, grass
starbursts, comets, shooting stars, galaxies, globular clusters, various celestial objects
explosions, crashing waves
fire, flames, fireworks
fleets of space ships, aliens, alien writing
coastlines, mountains
diffraction patterns
barbed wire, necklaces
lattice-works, spider webs, lace
temple spires
DNA & proteins
primitive lifeforms
cloud chamber tracks
dragons, bugs, butterflies, dragonflies
aboriginal paintings, modern art, abstract objects
brush strokes, calligraphy
cat scratches, claw marks
Serpinski's Triangle-press [s] in [3]-map mode
Normal geometric objects (point, line, angle, triangle, square, rectangle, parallelogram, etc., although I have not yet seen a pure circle or disc)
All of this in under 1K..., just keep pressing [r] !

Complexity = Simple rules * Endless repetition
This is the wondrous secret of life...

Here are some other websites with some very nice fractal pics:
Fractal Science Kit

Now for some of the mathematics...
The IFS (Iterated Function System) fractal system uses a series of linear, attractive, transformation matrices to generate the fractal patterns.
Each transformation has 3 components. Imagine that you have a unit-square with corners at (0,0) and (1,1).
1st, the x and y directions are separately scaled inward by factors from 0 to 1. This usually squeezes the unit square into a smaller rectangle.
2nd, this object is rotated about the origin by 0 to 2*Pi radians. Actually, this can be done separately about each axis, giving a rhombus.
3rd, the rotated rhombus is translated short distances along the x and y directions, usually from 0 to 1.
The resulting transformation creates a transformation "map", which looks like y=Ax + b, where A is a matrix and b, x, y are vectors.
Iterated transformations using this single map will eventually take any point in the unit square to a fixed point. This is an attractor.
The trick to make fractals is to use 2+ maps, and pick which map you choose at random.
Start with a random point in the unit square, and then pick the maps at random. The point will now jump around, creating a fractal pattern.
You can use the different color modes to see how the point "explores" the "fractal space".
Even small changes in the parameters can lead to vastly different structures, even on 2-map systems, which are some of the most interesting.
The fractal pattern has the characteristic of a topological self-similarity on different size scales. You can see this by using the different color modes.

Now for some of the computing...
I was raised on computers where 4KB was a lot of memory, and 64KB was huge. One of the fun things to do was write a 1-line program in BASIC that would do something cool. If I remember right, this was a max of about 256 chars. Anyway, I wanted to write a simple program in the Windows environment that wasn't humongous, with is pretty hard to do. So, assembly language. Let's write a cool program that compiles to 1KB or less. It needs to be fast since it is just continuous repetition. So, integer mathematics instead of the more realistic, but slow, real mathematics. So, we use integer math and let the fractal grow in "fractal space", which is limited only by your max longint. This "fractal space" is then stretched and squeezed to fit the "screen space", typically something like 640x480, which is simple and easy to use via DOS interrupts, and gives 16 colors to play with. Now, since we are using integer math, which has inherent round-off error, we might get some artifacts which are not strictly fractal in origin, hence the 1-map mode, but which every once in a while give something interesting. However, the resulting pictures are definitely fractal. Now, we can make it really small by using the stack, but it's fun to come up with a splash screen that fits into some of the variables. It's also cool to see a program that will fit onto a single small screen using the Windows NotePad. Now, add some cool color modes, ability to change number of maps, some restrictions on parameters, and Wah-lah!!! Fractal Origami !! - Enjoy !!

If you know of a good site that could be added, or have a comment about this site, or just want to say 'hi', please email John.

The Science Realm: John's Virtual Sci-Tech Universe
John's Science & Math Stuff: | About John | Send email to John
4-Vectors | Ambigrams | Antipodes | Covert Ops Fragments | Cyrillic Projector | Forced Induction (Sums Of Powers Of Integers) | Fractals | Frontiers |
JavaScript Graphics | Kid Science | Kryptos | Photography | Prime Sieve | QM from SR | QM from SR-Simple RoadMap | Quantum Phase | Quotes |
RuneQuest Cipher Challenge | Scientific Calculator | Secret Codes & Ciphers | Science+Math | Sci-Pan Pantheist Poems | Stereograms | Turkish Grammar |

Quantum Mechanics is derivable from Special Relativity
See QM from SR-Simple RoadMap