分形/複平面迭代/q迭代

迭代在數學中指的是迭代一個函式的過程,即重複應用一個函式,使用一次迭代的輸出作為下一次迭代的輸入。[1] 即使是看似簡單的函式的迭代也會產生複雜的行為和難題。[2]
可以進行逆(向後迭代)
- 排斥器用於繪製Julia集(IIM/J)[3]
- Jlia集外的圓圈(半徑=ER)用於繪製逃逸時間等值線(趨向於Julia集)[4]
- Julia集內的圓圈(半徑=AR)用於繪製吸引時間等值線(趨向於Julia集)[5]
- 臨界軌道(在Siegel圓盤情況下)用於繪製Julia集(可能僅在黃金分割的情況下)
- 用於繪製外部射線
向前迭代的排斥器是向後迭代的吸引器
- 迭代始終在動態平面上。
- 引數平面上沒有動態。
- Mandelbrot集沒有動力學。它是一組引數值。
- 引數平面上沒有軌道,不應該在引數平面上繪製軌道。
- 臨界點的軌道在動態平面上
這是安德魯·羅賓斯2006-02-15在Tetration論壇上的文章的一部分,作者是安德魯·羅賓斯
"迭代是動力學、混沌、分析、遞迴函式和數論的基礎。在這些學科中,大多數情況下所需的迭代是整數迭代,即迭代引數為整數。然而,在動力系統研究中,連續迭代對於解決某些系統至關重要。
不同的迭代型別可以分類如下
- 離散迭代
- 整數迭代
- 分數迭代或有理迭代
- 非解析分數迭代
- 解析分數迭代
- 連續迭代
迭代函式
迭代的通常定義,其中函式方程
用於生成序列
稱為f(x)的自然迭代,在組合下形成一個么半群。
對於可逆函式f(x),逆函式也被認為是迭代,並形成序列
稱為f(x)的整數迭代,在組合下形成一個群。
求解函式方程:。求解完該函式方程後,就可以求出有理迭代,即的整數迭代。
非解析分數迭代
[edit | edit source]選擇非解析分數迭代,得到的結果將不是唯一的。(Iga 的方法)
解析分數迭代
[edit | edit source]求解解析分數迭代,將得到一個唯一的解。(Dahl 的方法)
連續迭代
[edit | edit source]這是對通常迭代概念的推廣,其中函式方程(FE):f n(x) = f(f n-1(x)) 必須在域(實數或複數)的所有 n 中成立。如果不是這樣,那麼為了討論這些型別的“迭代”(即使它們在技術上不是“迭代”,因為它們不遵循迭代的 FE),我們將討論它們,就好像它們是 f n(x) 的表示式,其中 0 ≤ Re(n) ≤ 1,並且在其他地方由迭代的 FE 定義。因此,即使一種方法是解析的,如果它不滿足這個基本的 FE,那麼根據這個重新定義,它就是非解析的。
非解析連續迭代
[edit | edit source]選擇非解析連續迭代,得到的結果將不是唯一的。(Galidakis 和 Woon 的方法)
解析連續迭代或解析迭代
[edit | edit source]求解解析連續迭代,將得到一個唯一的解。
實解析迭代
[edit | edit source]復解析迭代或全純迭代
[edit | edit source]步長
[edit | edit source]
視覺化
[edit | edit source]分解
[edit | edit source]在復二次多項式的情況下,迭代過程中的移動是複數。它包含 2 個移動
- 角移動 = 旋轉(參見倍增對映)
- 徑向移動(參見外部和內部射線,不變曲線)
- 落入目標集和吸引子(在雙曲和拋物線情況下)
- 徑向移動
-
半徑 abs(z) = r < 1.0,經過一些使用 f0(z) = z*z 的迭代後
-
點的重複迭代之間的距離小於 1
- 角移動
-
倍增對映後的角度為 1/7
-
倍增對映後的角度為 1/15
-
倍增對映後的角度為 11/36
角移動(旋轉)
[edit | edit source]以轉數計算複數的幅角[14]
/*
gives argument of complex number in turns
*/
double GiveTurn( double complex z){
double t;
t = carg(z);
t /= 2*pi; // now in turns
if (t<0.0) t += 1.0; // map from (-1/2,1/2] to [0, 1)
return (t);
}
方向
[edit | edit source]正向
[edit | edit source]反向
[edit | edit source]
反向迭代或逆迭代[15]
- Peitgen
- W Jung
- John Bonobo[16]
Peitgen
[edit | edit source] /* Zn*Zn=Z(n+1)-c */
Zx=Zx-Cx;
Zy=Zy-Cy;
/* sqrt of complex number algorithm from Peitgen, Jurgens, Saupe: Fractals for the classroom */
if (Zx>0)
{
NewZx=sqrt((Zx+sqrt(Zx*Zx+Zy*Zy))/2);
NewZy=Zy/(2*NewZx);
}
else /* ZX <= 0 */
{
if (Zx<0)
{
NewZy=sign(Zy)*sqrt((-Zx+sqrt(Zx*Zx+Zy*Zy))/2);
NewZx=Zy/(2*NewZy);
}
else /* Zx=0 */
{
NewZx=sqrt(fabs(Zy)/2);
if (NewZx>0) NewZy=Zy/(2*NewZx);
else NewZy=0;
}
};
if (rand()<(RAND_MAX/2))
{
Zx=NewZx;
Zy=NewZy;
}
else {Zx=-NewZx;
Zy=-NewZy; }
Mandel
[edit | edit source]以下是使用來自 Wolf Jung 編寫的程式 Mandel 的程式碼,進行逆迭代的 c 程式碼示例。
/*
/*
gcc i.c -lm -Wall
./a.out
z = 0.000000000000000 +0.000000000000000 i
z = -0.229955135116281 -0.141357981605006 i
z = -0.378328716195789 -0.041691618297441 i
z = -0.414752103217922 +0.051390827017207 i
*/
#include <stdio.h>
#include <math.h> // M_PI; needs -lm also
#include <complex.h>
/* find c in component of Mandelbrot set
uses code by Wolf Jung from program Mandel
see function mndlbrot::bifurcate from mandelbrot.cpp
http://www.mndynamics.com/indexp.html
*/
double complex GiveC(double InternalAngleInTurns, double InternalRadius, unsigned int Period)
{
//0 <= InternalRay<= 1
//0 <= InternalAngleInTurns <=1
double t = InternalAngleInTurns *2*M_PI; // from turns to radians
double R2 = InternalRadius * InternalRadius;
double Cx, Cy; /* C = Cx+Cy*i */
switch ( Period ) // of component
{
case 1: // main cardioid
Cx = (cos(t)*InternalRadius)/2-(cos(2*t)*R2)/4;
Cy = (sin(t)*InternalRadius)/2-(sin(2*t)*R2)/4;
break;
case 2: // only one component
Cx = InternalRadius * 0.25*cos(t) - 1.0;
Cy = InternalRadius * 0.25*sin(t);
break;
// for each iPeriodChild there are 2^(iPeriodChild-1) roots.
default: // higher periods : to do, use newton method
Cx = 0.0;
Cy = 0.0;
break; }
return Cx + Cy*I;
}
/* mndyncxmics::root from mndyncxmo.cpp by Wolf Jung (C) 2007-2014. */
// input = x,y
// output = u+v*I = sqrt(x+y*i)
complex double GiveRoot(complex double z)
{
double x = creal(z);
double y = cimag(z);
double u, v;
v = sqrt(x*x + y*y);
if (x > 0.0)
{ u = sqrt(0.5*(v + x)); v = 0.5*y/u; return u+v*I; }
if (x < 0.0)
{ v = sqrt(0.5*(v - x)); if (y < 0.0) v = -v; u = 0.5*y/v; return u+v*I; }
if (y >= 0.0)
{ u = sqrt(0.5*y); v = u; return u+v*I; }
u = sqrt(-0.5*y);
v = -u;
return u+v*I;
}
// from mndlbrot.cpp by Wolf Jung (C) 2007-2014. part of Madel 5.12
// input : c, z , mode
// c = cx+cy*i where cx and cy are global variables defined in mndynamo.h
// z = x+y*i
//
// output : z = x+y*i
complex double InverseIteration(complex double z, complex double c, char key)
{
double x = creal(z);
double y = cimag(z);
double cx = creal(c);
double cy = cimag(c);
// f^{-1}(z) = inverse with principal value
if (cx*cx + cy*cy < 1e-20)
{
z = GiveRoot(x - cx + (y - cy)*I); // 2-nd inverse function = key b
if (key == 'B') { x = -x; y = -y; } // 1-st inverse function = key a
return -z;
}
//f^{-1}(z) = inverse with argument adjusted
double u, v;
complex double uv ;
double w = cx*cx + cy*cy;
uv = GiveRoot(-cx/w -(cy/w)*I);
u = creal(uv);
v = cimag(uv);
//
z = GiveRoot(w - cx*x - cy*y + (cy*x - cx*y)*I);
x = creal(z);
y = cimag(z);
//
w = u*x - v*y;
y = u*y + v*x;
x = w;
if (key =='A'){
x = -x;
y = -y; // 1-st inverse function = key a
}
return x+y*I; // key b = 2-nd inverse function
}
/*f^{-1}(z) = inverse with argument adjusted
"When you write the real and imaginary parts in the formulas as complex numbers again,
you see that it is sqrt( -c / |c|^2 ) * sqrt( |c|^2 - conj(c)*z ) ,
so this is just sqrt( z - c ) except for the overall sign:
the standard square-root takes values in the right halfplane, but this is rotated by the squareroot of -c .
The new line between the two planes has half the argument of -c .
(It is not orthogonal to c ... )"
...
"the argument adjusting in the inverse branch has nothing to do with computing external arguments. It is related to itineraries and kneading sequences, ...
Kneading sequences are explained in demo 4 or 5, in my slides on the stripping algorithm, and in several papers by Bruin and Schleicher.
W Jung " */
double complex GiveInverseAdjusted (complex double z, complex double c, char key){
double t = cabs(c);
t = t*t;
z = csqrt(-c/t)*csqrt(t-z*conj(c));
if (key =='A') z = -z; // 1-st inverse function = key a
// else key == 'B'
return z;
}
// make iMax inverse iteration with negative sign ( a in Wolf Jung notation )
complex double GivePrecriticalA(complex double z, complex double c, int iMax)
{
complex double za = z;
int i;
for(i=0;i<iMax ;++i){
printf("i = %d , z = (%f, %f) \n ", i, creal(za), cimag(za) );
za = InverseIteration(za,c, 'A');
}
printf("i = %d , z = (%f, %f) \n ", i, creal(za), cimag(za) );
return za;
}
// make iMax inverse iteration with negative sign ( a in Wolf Jung notation )
complex double GivePrecriticalA2(complex double z, complex double c, int iMax)
{
complex double za = z;
int i;
for(i=0;i<iMax ;++i){
printf("i = %d , z = (%f, %f) \n ", i, creal(za), cimag(za) );
za = GiveInverseAdjusted(za,c, 'A');
}
printf("i = %d , z = (%f, %f) \n ", i, creal(za), cimag(za) );
return za;
}
int main(){
complex double c;
complex double z;
complex double zcr = 0.0; // critical point
int iMax = 10;
int iPeriodChild = 3; // period of
int iPeriodParent = 1;
c = GiveC(1.0/((double) iPeriodChild), 1.0, iPeriodParent); // root point = The unique point on the boundary of a mu-atom of period P where two external angles of denominator = (2^P-1) meet.
z = GivePrecriticalA( zcr, c, iMax);
printf("iAngle = %d/%d c = (%f, %f); z = (%.16f, %.16f) \n ", iPeriodParent, iPeriodChild, creal(c), cimag(c), creal(z), cimag(z) );
z = GivePrecriticalA2( zcr, c, iMax);
printf("iAngle = %d/%d c = (%f, %f); z = (%.16f, %.16f) \n ", iPeriodParent, iPeriodChild, creal(c), cimag(c), creal(z), cimag(z) );
return 0;
}
測試
[edit | edit source]可以無限次迭代。測試將告知何時可以停止。
- 正向迭代的逃逸測試
目標集 用於測試。當 zn 在目標集中時,就可以停止迭代。
"曼德布羅特集沒有動力學。它是一組引數值。引數平面上沒有軌道,不應該在引數平面上繪製軌道。臨界點的軌道在動力學平面上"
"The polynomial Pc maps each dynamical ray to another ray doubling the angle (which we measure in full turns, i.e. 0 = 1 = 2π rad = 360◦), and the dynamical rays of any polynomial “look like straight rays” near infinity. This allows us to study the Mandelbrot and Julia sets combinatorially, replacing the dynamical plane by the unit circle, rays by angles, and the quadratic polynomial by the doubling modulo one map." Virpi K a u k o[17]

假設 c=0,那麼可以將動力學平面稱為 平面。
這裡,動力學平面可以被分為:
- Julia 集 =
- Fatou 集,它包含兩個子集:
- Julia 集的內部 = 有限吸引子的吸引域 =
- Julia 集的外部 = 無窮大的吸引域 =



其中:
- r 是複數 z = x + i 的絕對值、模數 或幅值
- 是複數 z 的輻角(在許多應用中稱為“相位”),是半徑與正實軸的夾角。通常使用主值。
因此
以及前向迭代:[18]
正向迭代
你可以互動式地檢查它
- Geogebra plet by Jorj Kowszun-Lecturer - 嘗試沿著從中心到外邊的徑向線移動,看看行為的變化
- M McClure 對複數平方迭代的視覺化
- W Jung 的 Mandel 程式
- Jeffrey Ventrella 對複數的平方
- MIT mathlets:複數指數
混沌與複數平方對映
[edit | edit source]迭代呈現混沌現象的非正式原因是,角度在每次迭代中翻倍,而翻倍隨著角度變得越來越大而迅速增長,但相差 2π 弧度的倍數的角度是相同的。因此,當角度超過 2π 時,它必須透過 2π 除以餘數進行*迴圈*。因此,角度根據二元變換(也稱為 2x 模 1 對映)進行變換。由於初始值 *z*0 被選擇為其幅角不是 π 的有理倍數,因此 *z**n* 的前向軌跡不能重複自身並變得週期性。
更正式地說,迭代可以寫成
其中 是透過迭代上述步驟獲得的複數序列,而 代表初始起始數字。我們可以精確地解決此迭代
從角度 θ 開始,我們可以將初始項寫成 ,因此 。這使得角度的連續加倍變得清晰。(這等效於關係 )。
逃逸測試
[edit | edit source]如果距離
- 點 z 屬於 Julia 集外部
- Julia 集
是
那麼點 z 逃逸(= 它的幅度大於 逃逸半徑 = ER)
之後
另請參閱
反向迭代
[edit | edit source]
每個角度(實數)α ∈ R/Z 以周為單位測量,都具有
注意,這兩個原像之間的差異
是半個週轉 = 180 度 = Pi 弧度。
在復動力平面使用二次多項式 進行反向迭代
給出反向軌道 = **原像的二叉樹**
在這樣的樹中,如果沒有額外資訊,就無法選擇好的路徑。
注意,原象顯示旋轉對稱性(180 度)
有關其他函式,請參閱 Fractalforum[25]
另請參閱
fc 的動態平面
[edit | edit source]可以使用以下方法進行檢查
逃逸時間或吸引時間的等高線
[edit | edit source]-
外部圓的原象給出逃逸時間的等高線
-
內部圓的原象給出吸引時間的等高線
IIM/J 繪製的朱莉婭集
[edit | edit source]理論
- 週期點在朱莉婭集中稠密
- 朱莉婭集是排斥週期點的集合的閉包
因此,繪製排斥週期點及其軌道(正向和反向 = 逆向)可以直觀地很好地近似朱莉婭集 = 點集足夠稠密,這些點在朱莉婭集上的非均勻分佈並不重要。
-
當 C = i 時,排斥不動點的原象趨向於朱莉婭集。影像和原始碼
-
使用 MIIM 繪製的朱莉婭集。影像和 Maxima 原始碼
-
在西格爾圓盤情況下,臨界軌道的原象趨向於整個朱莉婭集
-
簡單 IIM/J 中的點分佈
-
c = -0.750357820200574 +0.047756163825227 i
-
C = ( 0.4 0.3 )
在逃逸時間中,計算點 z 的正向迭代。
在 IIM/J 中,計算
- 複雜二次多項式的排斥不動點[26]
- 透過逆向迭代計算 的原象
"We know the periodic points are dense in the Julia set, but in the case of weird ones (like the ones with Cremer points, or even some with Siegel disks where the disk itself is very 'deep' within the Julia set, as measured by the external rays), the periodic points tend to avoid certain parts of the Julia set as long as possible. This is what causes the 'inverse method' of rendering images of Julia sets to be so bad for those cases." Jacques Carette[27]
因為平方根是多值函式,所以每個 都有兩個原象 。因此,逆向迭代會建立二叉樹 的原象。
-
二叉樹
-
二叉樹的擴充套件增長
由於二叉樹的擴充套件增長,原象的數量呈指數級增長:完整二叉樹中節點的數量 為
其中
- 是樹的高度
如果要繪製完整二叉樹,則儲存二叉樹的方法會浪費大量記憶體,因此另一種方法是
- 執行緒二叉樹
- 只繪製二叉樹中的某些路徑
- 隨機路徑:最長路徑 = 從根到葉的路徑
另請參閱
樹的根
[edit | edit source]“...排斥不動點β的原像。它們形成一棵樹狀的
beta
beta -beta
beta -beta x y
因此,當您從β開始構建樹時,每個點最終都會被計算兩次。如果您從-β開始,您將獲得相同數量的點,但計算次數減半。
類似的情況也適用於臨界軌道的原像。如果z在臨界軌道上,它的兩個原像中也會有一個在其中,所以您應該繪製-z及其原像的樹,以避免重複計算相同點。”(Wolf Jung)
- 隨機選擇兩個根中的一個 IIM(直到選擇的最大級別)。隨機遍歷樹。最簡單的編碼和快速,但效率低下。從它開始。
- 兩個根以相同的機率
- 一個根比另一個根更頻繁
- 繪製所有根(直到選擇的最大級別)[31]
- 使用遞迴
- 使用堆疊(更快?)
- 在二叉樹中繪製一些罕見路徑 = MIIM。這是繪製所有根的修改。停止使用一些罕見路徑。
程式碼示例
| Maxima CAS 原始碼 - 簡單 IIM。點選右側檢視 |
|---|
| 所有程式碼只有一個函式 請點選這裡檢視 |
finverseplus(z,c):=sqrt(z-c);
finverseminus(z,c):=-sqrt(z-c);
c:%i; /* define c value */
iMax:5000; /* maximal number of reversed iterations */
fixed:float(rectform(solve([z*z+c=z],[z]))); /* compute fixed points of f(z,c) : z=f(z,c) */
if (abs(2*rhs(fixed[1]))<1) /* Find which is repelling */
then block(beta:rhs(fixed[1]),alfa:rhs(fixed[2]))
else block(alfa:rhs(fixed[1]),beta:rhs(fixed[2]));
z:beta; /* choose repeller as a starting point */
/* make 2 list of points and copy beta to lists */
xx:makelist (realpart(beta), i, 1, 1); /* list of re(z) */
yy:makelist (imagpart(beta), i, 1, 1); /* list of im(z) */
for i:1 thru iMax step 1 do /* reversed iteration of beta */
block
(if random(1.0)>0.5 /* random choose of one of two roots */
then z:finverseplus(z,c)
else z:finverseminus(z,c),
xx:cons(realpart(z),xx), /* save values to draw it later */
yy:cons(imagpart(z),yy)
);
plot2d([discrete,xx,yy],[style,[points,1,0,1]]); /* draw reversed orbit of beta */
|
與之比較
| Maxima CAS 原始碼 - 使用命中表的 MIIM。點選右側檢視 |
|---|
| 所有程式碼只有一個函式 請點選這裡檢視 |
/* Maxima CAS code */
/* Gives points of backward orbit of z=repellor */
GiveBackwardOrbit(c,repellor,zxMin,zxMax,zyMin,zyMax,iXmax,iYmax):=
block(
hit_limit:4, /* proportional to number of details and time of drawing */
PixelWidth:(zxMax-zxMin)/iXmax,
PixelHeight:(zyMax-zyMin)/iYmax,
/* 2D array of hits pixels . Hit > 0 means that point was in orbit */
array(Hits,fixnum,iXmax,iYmax), /* no hits for beginning */
/* choose repeller z=repellor as a starting point */
stack:[repellor], /*save repellor in stack */
/* save first point to list of pixels */
x_y:[repellor],
/* reversed iteration of repellor */
loop,
/* pop = take one point from the stack */
z:last(stack),
stack:delete(z,stack),
/*inverse iteration - first preimage (root) */
z:finverseplus(z,c),
/* translate from world to screen coordinate */
iX:fix((realpart(z)-zxMin)/PixelWidth),
iY:fix((imagpart(z)-zyMin)/PixelHeight),
hit:Hits[iX,iY],
if hit<hit_limit
then
(
Hits[iX,iY]:hit+1,
stack:endcons(z,stack), /* push = add z at the end of list stack */
if hit=0 then x_y:endcons( z,x_y)
),
/*inverse iteration - second preimage (root) */
z:-z,
/* translate from world to screen coordinate, coversion to integer */
iX:fix((realpart(z)-zxMin)/PixelWidth),
iY:fix((imagpart(z)-zyMin)/PixelHeight),
hit:Hits[iX,iY],
if hit<hit_limit
then
(
Hits[iX,iY]:hit+1,
stack:endcons(z,stack), /* push = add z at the end of list stack to continue iteration */
if hit=0 then x_y:endcons( z,x_y)
),
if is(not emptyp(stack)) then go(loop),
return(x_y) /* list of pixels in the form [z1,z2] */
)$
|
| Octave 原始碼 - 使用命中表的 MIIM。點選右側檢視 |
|---|
| iimm_hit.m |
# octave m-file
# IIM using Hit table
# save as a iimm_hit.m in octave working dir
# run octave and iimm_hit
#
# stack-like operation
# http://www.gnu.org/software/octave/doc/interpreter/Miscellaneous-Techniques.html#Miscellaneous-Techniques
# octave can resize array
# a = [];
# while (condition)
# a(end+1) = value; # "push" operation
# a(end) = []; # "pop" operation
#
# -------------- general octave settings ----------
clear all;
more off;
pkg load image; # imwrite
pkg load miscellaneous; # waitbar
# --------------- const and var -----------------------------
# define some global var AT EACH LEVEL where you want to use it ( Pascal CdeMills)
# ? for global variables one can't define and give initial value at the same time
# integer ( screen ) coordinate
iSide = 1000
ixMax = iSide
iyMax = iSide
#
global HitLimit;
HitLimit=1 # proportional to number of details and time of drawing
global Hits; # 2D array of pixels . Hit > 0 means that point was in orbit
Hits = zeros(iyMax,ixMax);
# image as a 2D matrix of 24 bit colors coded from 0.0 to 1.0
global MyImage;
MyImage = zeros(iyMax,ixMax,3); # matrix filled with 0.0 ( black image)= [rows, columns, color_depth]
# world ( float) coordinate - dynamical (Z) plane
global dSide;
global ZxMin ;
global ZxMax;
global ZyMin;
global ZyMax ;
global z;
global PixelHeight ;
global PixelWidth ;
# add values to global variables
dSide=1.25
ZxMin = -dSide
ZxMax = dSide
ZyMin = -dSide
ZyMax = dSide
PixelHeight = (ZyMax - ZyMin)/(iyMax - 1)
PixelWidth = (ZxMax - ZxMin)/(ixMax - 1)
# pseudo stack = resizable array
global Stack;
Stack=[];
global StackIndex;
StackIndex=0;
c = complex(.27327401, 0.00756218);
global Color24White;
Color24White=[1.0, 1.0, 1.0];
# ---------------- functions ------------------
function [iY, iX] = f(z)
# define some global var AT EACH LEVEL where you want to use it ( Pascal CdeMills)
global ZxMin;
global ZyMax;
global PixelWidth;
global PixelHeight;
# translate from world to screen coordinate
iX=int32((real(z)-ZxMin)/PixelWidth);
iY=int32((ZyMax - imag(z))/PixelHeight); # invert y axis
endfunction;
# plot point with integer coorfinate to array MyImage
function Plot( iY, iX , color )
global MyImage;
MyImage(iY, iX, 1) = color(1);
MyImage(iY, iX, 2) = color(2);
MyImage(iY, iX, 3) = color(3);
endfunction;
# push = put point z on the stack
function push(z)
global Stack;
global StackIndex;
StackIndex =size(Stack,2); # update global var
StackIndex = StackIndex +1; # update global var
Stack(StackIndex) = z; # "push" z on pseudo stack
endfunction;
# pop = take point z from the stack
function z = pop()
global Stack;
global StackIndex;
StackIndex =size(Stack,2); # update global var
z = Stack(StackIndex); # pop z from pseudo stack
Stack(StackIndex) = []; # make pseudo stack shorter
StackIndex = StackIndex -1 ; # update global var
endfunction;
function CheckPoint(z)
# error is here
global Hits;
global HitLimit;
global Color24White;
[iY, iX] = f(z);
hit = Hits(iY, iX);
if (hit < HitLimit)
push(z); # (put z on the stack) to continue iteration
if (hit<1) Plot( iY, iX , Color24White ); endif; # plot
Hits(iY, iX) = hit + 1; # update Hits table
endif;
endfunction; # CheckPoint
# -------------------- main ---------------------------------------
# Determine the unstable fixed point beta
# http://en.wikipedia.org/wiki/Periodic_points_of_complex_quadratic_mappings
beta = 0.5+sqrt(0.25-c)
z=-beta
CheckPoint(z);
while (StackIndex>0) # if stack is not empty
z = pop(); # take point z from the stack
# compute its 2 preimages z and -z ( inverse function of complex quadratic polynomial)
z= sqrt(z-c);
# check points : draw, put on the stack to continue iterations
CheckPoint(z);
CheckPoint(-z);
endwhile;
# ------------------- image --------------------------------------
imread("a7.png");# first load any existing image to resolve bug : panic crash using imwrite: octave: magick/semaphore.c:525 first load any image
image(MyImage); # Display Image
name = strcat("iim",int2str(HitLimit), " .png");
imwrite(MyImage,name); # save image to file. this requires the ImageMagick "convert" utility.
|
另請參閱
- 顏色:朱利亞集的不同部分具有不同的顏色
- 動力系統
- 不動點
- 李雅普諾夫數
- 函式方程
- 阿貝爾函式
- 施羅德函式
- 博特切函式
- 朱利亞函式
- 特殊矩陣
- 卡萊曼矩陣
- 貝爾矩陣
- 阿貝爾-羅賓斯矩陣
- ↑ 維基百科:迭代
- ↑ 從區域性到全域性的迭代理論 - 瓦茨拉夫·庫切拉
- ↑ 朱利亞集的逆迭代演算法 - 馬克·麥克盧爾
- ↑ 微型計算機的復迭代
- ↑ 關於具有兩個臨界點的有理對映 - 約翰·米爾諾,圖 5
- ↑ 迭代函式 - 湯姆·戴維斯
- ↑ 迭代函式的泰勒級數的存在性和唯一性 - 丹尼爾·蓋斯勒
- ↑ 動力學對映的連續迭代 - R. 阿爾德羅萬迪,L. P. 弗雷塔斯(聖保羅,IFT)
- ↑ 分形的連續迭代 - 格拉德·維斯特多普
- ↑ 如何摺疊朱利亞分形 - 史蒂文·維滕斯
- ↑ 將圓形摺疊成朱利亞集 - 卡爾·西姆斯
- ↑ 朱利亞集中複雜性的視覺解釋 - 奧克·施賴弗斯,雅克·J·範·維克(見支援資訊中的影片)
- ↑ 如何構建朱利亞集
- ↑ 轉向
- ↑ 理解朱利亞集和曼德布羅集 - 卡爾·西姆斯
- ↑ 繪製朱利亞集的快速方法:逆迭代 - 約翰·博諾博
- ↑ 曼德布羅集中可見分量的樹 - 維爾皮·考科,FUNDAMENTA MATHEMATICAE 164(2000)
- ↑ 多項式迭代的實部和虛部 - 朱莉婭·A·巴恩斯,克林頓·P·卡里和麗貝斯·E·紹布羅克。紐約數學雜誌 16(2010)749-761。
- ↑ mandelbrot-hue - 理查德·A·湯姆森
- ↑ 相位 - 利納斯·維普斯塔斯
- ↑ 複數 - 戴維·E·喬伊斯
- ↑ 複數的冪 - 夢之箱
- ↑ 拋物線朱利亞集是多項式時間可計算的 - 馬克·布拉弗曼
- ↑ 符號動力學和自相似群 - 弗拉基米爾·涅克拉舍維奇
- ↑ 關於一般朱利亞集 IFS 的更高次冪查詢。
- ↑ 維基百科:排斥不動點
- ↑ mathbbc/185430 mathoverflow 問題:多項式迭代的週期點聚類
- ↑ Wolfram Alpha
- ↑ 示例
- ↑ wikipedia : 排斥不動點
- ↑ Fractint 文件 - 逆 Julia 集
- ↑ 影像和 c 原始碼 : 使用命中限制的 IIMM
- ↑ 克里斯·金 - 探索混沌的黑暗之心
- ↑ Drakopoulos V.,比較 Julia 集的渲染方法,WSCG 雜誌 10 (2002),155-161
- ↑ bugman123:分形
- ↑ dhushara : DarkHeart