Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
45
Task/Mandelbrot-set/IDL/mandelbrot-set-1.idl
Normal file
45
Task/Mandelbrot-set/IDL/mandelbrot-set-1.idl
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
PRO Mandelbrot,xRange,yRange,xPixels,yPixels,iterations
|
||||
|
||||
xPixelstartVec = Lindgen( xPixels) * Float(xRange[1]-xRange[0]) / $
|
||||
xPixels + xRange[0]
|
||||
yPixelstartVec = Lindgen( yPixels) * Float(YRANGE[1]-yrange[0])$
|
||||
/ yPixels + yRange[0]
|
||||
|
||||
constArr = Complex( Rebin( xPixelstartVec, xPixels, yPixels),$
|
||||
Rebin( Transpose(yPixelstartVec), xPixels, yPixels))
|
||||
|
||||
valArr = ComplexArr( xPixels, yPixels)
|
||||
|
||||
res = IntArr( xPixels, yPixels)
|
||||
|
||||
oriIndex = Lindgen( Long(xPixels) * yPixels)
|
||||
|
||||
FOR i = 0, iterations-1 DO BEGIN ; only one loop needed
|
||||
|
||||
; calculation for whole array at once
|
||||
valArr = valArr^2 - constArr
|
||||
|
||||
whereIn = Where( Abs( valArr) LE 4.0d, COMPLEMENT=whereOut)
|
||||
|
||||
IF whereIn[0] EQ -1 THEN BREAK
|
||||
|
||||
valArr = valArr[ whereIn]
|
||||
|
||||
constArr = constArr[ whereIn]
|
||||
|
||||
IF whereOut[0] NE -1 THEN BEGIN
|
||||
|
||||
res[ oriIndex[ whereOut]] = i+1
|
||||
|
||||
oriIndex = oriIndex[ whereIn]
|
||||
ENDIF
|
||||
ENDFOR
|
||||
|
||||
tv,res ; open a window and show the result
|
||||
|
||||
END
|
||||
|
||||
|
||||
Mandelbrot,[-1.,2.3],[-1.3,1.3],640,512,200
|
||||
|
||||
END
|
||||
1
Task/Mandelbrot-set/IDL/mandelbrot-set-2.idl
Normal file
1
Task/Mandelbrot-set/IDL/mandelbrot-set-2.idl
Normal file
|
|
@ -0,0 +1 @@
|
|||
GDL>.run mandelbrot
|
||||
1
Task/Mandelbrot-set/IDL/mandelbrot-set-3.idl
Normal file
1
Task/Mandelbrot-set/IDL/mandelbrot-set-3.idl
Normal file
|
|
@ -0,0 +1 @@
|
|||
GDL> Mandelbrot,[-1.,2.3],[-1.3,1.3],640,512,200
|
||||
Loading…
Add table
Add a link
Reference in a new issue