unit MainUnit; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtDlgs, Menus, StdCtrls, G32_RangeBars, ExtCtrls, TB97Ctls, TB97, TB97Tlbr, G32_Image; type affineArray = array [1..60] of Double; type TInfo = Record cx, cy: Double; zx, zy: Double; CRMIN, CRMAX, CRMID, CIMIN, CIMAX, CIMID: Double; CRMIN_NEW, CRMAX_NEW, CRMID_NEW, CIMIN_NEW, CIMAX_NEW, CIMID_NEW: Double; CRMID_OLD, CIMID_OLD: Double; CRMID_JUL, CIMID_JUL: Double; CRMIN1, CRMAX1, CRMID1, CIMIN1, CIMAX1, CIMID1: Double; CRMIN_NEW1, CRMAX_NEW1, CRMID_NEW1, CIMIN_NEW1, CIMAX_NEW1, CIMID_NEW1: Double; CRMID_OLD1, CIMID_OLD1: Double; CRMID_JUL1, CIMID_JUL1: Double; dMag_new, dMagnification: double; dMag_new1, dMagnification1: double; Radius_x, Radius_y: Double; rx_ratio, ry_ratio: Double; xtot, ytot: Double; xsav, ysav: Double; dFactor1, dFactor2, dFactor3, dFactor4, dFactor5: Double; dStrands: Double; ti_power: Double; r, g, b: Double; dRedStep, dBluStep, dGrnStep: Double; dRedStep1, dBluStep1, dGrnStep1: Double; dRedStart, dBluStart, dGrnStart: Double; dRedSaturate, dBluSaturate, dGrnSaturate: Double; dRedOffset, dBluOffset, dGrnOffset: Double; StrTitle: pAnsiChar; StrDescription: pAnsiChar; szFormulaFile: pAnsiChar; szRenderFile: pAnsiChar; pXData: Pointer; pYData: Pointer; hDLLHandle: THandle; hDLLFormulaHandle: THandle; hDLLRenderHandle: THandle; iWidth, iHeight: Integer; iWidth1, iHeight1: Integer; Bailout, Maxit, Iteration: Integer; rb_width, rb_height, rb_left, rb_top: Integer; formula: Integer; render: Integer; formula_total: Integer; render_total: Integer; FractalType: Integer; nBlendingMethod: Integer; nColoringOrder: Integer; jul: Integer; jul_save: Integer; inverse: Integer; nRotation: Integer; RedInverse, GrnInverse, BluInverse: Integer; lmapping: Integer; derivative: Integer; nTransform: Integer; //////////////////////////////// nCoefficients: Integer; T1, nPoints: Integer; xMin, yMin, xMax, yMax: Double; RandomFactor: double; AA, BB, C, Lyapunov: double; AA_Initial: double; bNone, bLinear, bSinusoidal, bSpherical, bSwirl, bHorseshoe, bPolar, bBent, bInversion: Bool; bInvert: Bool; bInitialize: Bool; Abort_Draw, bSqrt: Bool; af, bf: affineArray; bitmap1: TBitmap; bitmap2: TBitmap; my_TList: TList; color: integer; bColorMix, bExpansion, bModulas: BOOL; bAtriatix: BOOL; end; pDataPointer = ^TInfo; var xArray: array[0..7000] of double; yArray: array[0..7000] of double; atr_width, atr_height: Integer; compress_ratio: Integer; bProgressive: bool; HelpFileName: String; const constArrayWIDTH: Integer = 640; constArrayHEIGHT: Integer = 480; constWIDTH: Integer = 180; // 320 constHEIGHT: Integer = 120; // 240 constMANDEL: Integer = 0; constNEWTON: Integer = 1; constWARPED_MANDEL: Integer = 2; constWARPED_NEWTON: Integer = 3; constZeroTol: Double = 1e-20; constVersionNumber: String = 'k t a z a_ v0.1'; constPI: Double = 3.14159265359; const2PI: Double = 6.28318530718; constDMax: Double = 1e24; constOverFlow = 1e12; r0Min = 0.01; r0Max = 15; type TMainForm = class(TForm) ImgView: TImgView32; Dock971: TDock97; Toolbar971: TToolbar97; AbortButton: TToolbarButton97; ResetButton: TToolbarButton97; SidePanel: TPanel; pnlImage: TPanel; Label1: TLabel; ScaleCombo: TComboBox; Panel2: TPanel; ImageInterpolate: TCheckBox; pnlBitmapLayer: TPanel; Label2: TLabel; Panel3: TPanel; LayerOpacity: TGaugeBar; LayerInterpolate: TCheckBox; LayerRescale: TButton; LayerResetScale: TButton; Cropped: TCheckBox; PnlMagn: TPanel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Panel4: TPanel; MagnOpacity: TGaugeBar; MagnMagnification: TGaugeBar; MagnRotation: TGaugeBar; MagnInterpolate: TCheckBox; MainMenu: TMainMenu; mnFile: TMenuItem; mnFileNew: TMenuItem; mnFileOpen: TMenuItem; mnLayers: TMenuItem; mnNewBitmapLayer: TMenuItem; mnNewBitmapRGBA: TMenuItem; mnNewCustomLayer: TMenuItem; mnSimpleDrawing: TMenuItem; mnMagnifier: TMenuItem; N4: TMenuItem; mnFlatten: TMenuItem; mnArrange: TMenuItem; mnBringFront: TMenuItem; mnSendBack: TMenuItem; N1: TMenuItem; mnLevelUp: TMenuItem; mnLevelDown: TMenuItem; N2: TMenuItem; mnScaled: TMenuItem; mnDelete: TMenuItem; OpenPictureDialog1: TOpenPictureDialog; SaveDialog1: TSaveDialog; private { Private declarations } public { Public declarations } end; var MainForm: TMainForm; implementation {$R *.DFM} end.