Sucie Long's profile

Fractal Animation Test

Here is all the code I used to create this animation. Don't be condused about Chinese characters, they are just comment lines.
=============Initial a rendering procedure=============
//定义一个渲染的过程
procedure RenderPro (width:Integer;height:Integer;i:Integer;filename:string);
begin
    Renderer.Width := width ;
    Renderer.Height := height; 
    Renderer.Filename := 'E:\fractal\my fractal\test\'+filename+inttostr(i)+'.jpg';
    SetRenderBounds ;           
    Render;       
    Flame.Name := filename + inttostr(i);
    SaveFlame('E:\fractal\my fractal\test\'+filename+'.flame');   
end;  

ShowMessage( 'Please set render parameters,it include four parameters' );
//设置渲染宽度
width := 640;//默认值
InputQuery('Firstly:set width','width:',width);
//设置渲染高度                      
height := 360;
InputQuery('Secondly:height','height:',height);
//保存文件名
filename := 'cube';//默认文件名
InputQuery('Thirdly:set name','it will be saved as    name:',filename);
//设置渲染深度
sampleDensity := 1;
InputQuery('fourthly:set depth','depth:',sampleDensity);
                                              
                       
                                 
Clear;                                                     
Flame.SampleDensity := sampleDensity; //赋予输入的深度值
Flame.Pitch := 0;
Flame.Yaw := 0;
Flame.X := 0;//横坐标偏移
Flame.Y := 0;       //纵坐标偏移
Flame.Scale := 15;
Flame.Scale := 10;
Flame.Background[0] := 0;
Flame.Background[1] := 0;
Flame.Background[2] := 0;
//012分别是红绿蓝
Flame.Width := 575;
Flame.Height := 439;
====================cube======================
//渲染开始
i:=0;
addTransform; //变换1
with Transform do begin
    linear3d := 0;
    sinusoidal := 1;
    pre_blur := 2;
    ztranslate := 1;
end;
addTransform; //变换2
with Transform do begin
    linear3d := 0;
    sinusoidal := 1;
    pre_blur := 2;
    ztranslate := 1;
    post_rotate_x := 1;
end;      
addTransform; //变换3
with Transform do begin
    linear3d := 0;
    sinusoidal := 1;
    pre_blur := 2;
    ztranslate := 1;
    post_rotate_x := 3;
end; 
addTransform; //变换4
with Transform do begin
    linear3d := 0;
    sinusoidal := 1;
    pre_blur := 2;
    ztranslate := 1;
    post_rotate_x := 2;
end; 
while i<30 do begin
    //对旋转过程的设置           
    setActiveTransform(0);
    with Transform do begin
        Flame.Pitch := 12*i;
        Flame.Yaw := 12*i;
    end;  
    preview;                                      
    RenderPro(width,height,i,filename);                                
    i:=i+1;
     
end;
===============Julian Ring=================
//渲染开始
i:=0;
addTransform; //变换1
with Transform do begin
    linear3d:=0;
    Weight := 50;
    rings2 := 1;
    rings2_val := 1;
    translate(0.2,-0.2);
end;
addTransform; //变换2
with Transform do begin
    linear3d :=0 ;
    Weight := 5;
    julian :=1;
    julian_power :=2000;
    julian_dist := 1;
end;
addTransform; //变换3
with Transform do begin
    linear3d :=0 ;
    Weight := 5;
    julian :=1;
    julian_power :=2000;
    julian_dist := 100;
end;

while i<90 do begin
    //对立方体旋转的设置        
    setActiveTransform(0);
    with Transform do begin
        Rotate(0.02*i);
    end;  
    preview;                                      
    RenderPro(width,height,i,filename);                                
    i:=i+1;
     
end;    
==================lotus=====================
//渲染开始
i:=0;
addTransform; //变换1
with Transform do begin
    Opacity:=0;
    Weight :=0.5;
    linear3d:=0;
    chaos[0] := 1;
    chaos[1] := 1;  
    chaos[2] := 0;
    chaos[3] := 0;
    pre_blur:=2;                                    
    separation:=2;
    //separation_x:=1;
    //separation_y:=1;
    //separation_xinside:=0;
    //separation_yinside:=0;
end;
addTransform; //变换2
with Transform do begin
    linear3d:=0;
    Weight :=0.5;
    pre_zscale :=-0.05;
    pre_ztranslate :=4;
    julia3D := 1;                                                                    
    julia3D_power :=-3;
    chaos[0] := 1;
    chaos[1] := 0;  
    chaos[2] := 1;                                                     
    chaos[3] := 1;
end;
 
addTransform; //变换3
with Transform do begin
    linear3d:=0.75;
    Weight :=0.5;
    zscale := 0.25;
    zcone := 0.25;
    chaos[0] := 1;
    chaos[1] := 0;  
    chaos[2] := 1;
    chaos[3] := 1;
    Rotate(-45);
end;                                                                               
                                                 
addTransform; //变换4
with Transform do begin
    linear3d:=0;
    Weight :=0.5;
    Transform.Color :=0.506;
    julia3D := 1;
    julia3D_power := 3;
    chaos[0] := 1;
    chaos[1] := 0;  
    chaos[2] := 1;
    chaos[3] := 1;  
    Translate(1,0.3);
end;     

while i<100 do begin//i的循环有问题
    //对开花过程的设置           
    setActiveTransform(0);
    with Transform do begin
            ztranslate:= -500+5*i;
            Flame.Scale := 40+0.1*i;//放大
           // Flame.Rotation := -3.5-1.2576*i;//镜头旋转
    end;  
    preview;                                      
    RenderPro(width,height,i,filename);                                
    i:=i+1;
     
end;
=====================kaleidoscope=================

//渲染开始
i:=0;
addTransform; //变换1
with Transform do begin
    Weight :=0.5;
    linear3d:=0;
    blur :=0.2;
end;
addTransform; //变换2
with Transform do begin
    Weight :=5;
    linear3d:=0;
    julian :=1;
    julian_power :=3;
    julian_dist :=-1;                                   
    Rotate(45);        
    Translate(0.2,0.2);
end;
 
addTransform; //变换3
with Transform do begin
    Weight :=1;
    linear3d:=0;
    julian :=0.2;
    julian_power :=15;
    julian_dist :=-1;
end;              
addTransform; //变换4
with Transform do begin
    Weight :=1;
    linear3d:=0;
    julian :=0.3;
    julian_power :=3;
    julian_dist :=-1;
    Rotate(45);
end;                                                                               
                                                                 
                 

while i<30 do begin//
    //对万花筒旋转过程的设置           
    setActiveTransform(1);
    with Transform do begin
        julian :=0.136+0.03*i;
    end;  
    preview;                                      
    RenderPro(width,height,i,filename);                                
    i:=i+1;
     
end;
==================epiphyllum====================
//渲染开始
i:=0;
addTransform; //变换1
with Transform do begin
    Opacity:=0;
    linear3d:=0;
    chaos[0] := 1;
    chaos[1] := 1;  
    chaos[2] := 0;
    pre_blur:=2;
    zcone:=2;
    cross:=0.03;                                     
    separation:=2;
    separation_x:=0;
    separation_y:=0.5;
    separation_xinside:=0;
    separation_yinside:=0;
end;
addTransform; //变换2
with Transform do begin
    linear3d:=0;
    chaos[0] := 0;
    chaos[1] := 0;  
    chaos[2] := 1;                                                                     
    julia3D:=1;
    julia3D_power:=-6;
end;
 
addTransform; //变换3
with Transform do begin
    linear3d:=0.73;
    chaos[0] := 1;                       
    chaos[1] := 0;                                                                      
    chaos[2] := 1;    
    zscale:=0.2;
    zcone:=0.259;
    Rotate(25);
end;                                                                               
while i<90 do begin//i的循环有问题
    //对开花过程的设置           
    setActiveTransform(0);
    with Transform do begin
            ztranslate:= 0.1*i;
            Flame.Pitch := 130-0.66*i;
    end;  
    preview;                                      
    RenderPro(width,height,i,filename);                                
    i:=i+1;
     
end;
Fractal Animation Test
Published:

Fractal Animation Test

My artwork is a fractal animation consists of five clips. All of them are writen in Delphi script and ran in Apophysis which is a fractal softwar Read More

Published: