Bild:3D Julia-set (IFS 001).jpg
aus Wikipedia, der freien Enzyklopädie
3D_Julia-set_(IFS_001).jpg (95 kB, MIME-Typ: image/jpeg)
Diese Datei wird aus dem zentralen, mehrsprachigen Dateiarchiv Wikimedia Commons eingebunden. Die Quellen- und Lizenzangaben nach dem roten Trennstrich stammen von der Original-Beschreibungsseite der Datei. |
Julia set, a fractal, here in three dimensions. The image was created from using a "iterated function system". This is not a quaternion - only three parameters; x, y, z was used in the reversed formula Z = sqrt(Z − C). In 2D the root function rotates to half the previous angle and scales to the root of the previous length. I developed a method to do this using three parameters, (see formula in C-code below).
See also:
External link:
- Download a demo program that creates images like this, (and more) from: 3djulia.htm
All freaktal images are from self-written tools. Linear fractals from my : "3D IFS studio" and "3D DTIFS" (dragon trees), non-linear IFS from "3D RJIFS" (3D rev Julia). |
See also: Solkoll & Solkoll 2D
[edit] Source-code:
C-code snippet:
// Notes:
// All variables are declared as "float" or "double". // x, y, z is the 3D variable "Z". // a, b, c is the 3D constant "C" (the Julia-coordinate).
// RND is a random float in the range 0 - 1, define it like this: // #define RND ( ( float ) rand ( ) / RAND_MAX )
// Here the function: x -= a; y -= b; z -= c; length = sqrtl ( x*x + y*y + z*z ); root = sqrtl ( length ); if ( length == fabsl ( x ) ) { if ( x < 0.0f ) { angle = RND * pi * 2.0f; y = cosl ( angle ) * root; z = sinl ( angle ) * root; x = 0.0f; } else { x = root; } } else if ( length > 0.0f ) { x = ( ( x - length ) / 2.0f ) + length; y = y / 2.0f; z = z / 2.0f; length = root / sqrtl ( x*x + y*y + z*z ); x *= length; y *= length; z *= length; }
// This is the IFS: randomly select any of the two roots :) if ( int ( RND * 2 ) ) { x = - x; y = - y; z = - z; }
If you like to get more information about this function? then write at: User talk:Solkoll or drop me a wikimail.
Dateiverweise
Die folgenden Artikel benutzen dieses Bild: