Chinaunix首页 | 论坛 | 博客
  • 博客访问: 41334
  • 博文数量: 47
  • 博客积分: 1000
  • 博客等级: 少尉
  • 技术积分: 490
  • 用 户 组: 普通用户
  • 注册时间: 2009-12-02 21:19
文章分类
文章存档

2010年(1)

2009年(46)

我的朋友
最近访客

分类:

2009-12-02 21:34:08

 
please refer to
 
 
thank you!
 
 
  Normal fractal algorithm is too strictly self-similar in modeling nature scenery, even a random issue is corporated, the process of genetic growth is still not simulated appropriately.
       
strictly sel-similarity      normal fractal tree
 
    In this paper, I adopted the concept of genetic operations into the traditional fractal-tree generating algorithms, design suitable data structure to encode the characteristic of the branch; GA operators such as cross-over、mutation、selection are operated on the code and the characteristic of the child branch is generated from the genetic operation of the parent branch; thus they are similar but not identical. The algorithm can generate an image that is self-similar but not strictly self-similar; the process of genetic growth can be simulated more appropriately and in more details.
 
The next two pictures are the first version. They remove the strict self similarity, but there are still a lot to improve...
                           GA fractal tree 1
                            GA fractal tree 2
 
The key to improve the reality is too increase the control on parameters.
 
branch angel control
branch number control
branch length control
 
 
branch position control
 
 
data structure
struct info{
CPoint p;  //branch start point
float plen;  //parent branch length
int pangl;   //parent branch angle
char h;     //1: right branch; 2: left branch
}
 
algorithm flow
do{
    crossover
    mutation
    do{
        select
        if (tree.cur.glen ) {//if 0,end evolution on this branch
            ……
            if (tree.depth ){//depth=0, no need to generate new branch, it is alreayd the last generation
                next_generation += number of branch
            }
        draw branch
        }
    cur_generation--;
    }while ( this->tree.cur_generation )
this->tree.depth--;
this->tree.cur_generation = this->tree.next_generation;
this->tree.next_generation = 0;
}while ( this->tree.depth >= 0 )
 
GA operator design
    crossover operator is essencially bit operations in this algorithm, I adopt the single point operator, its mutation race is minimul in all types of crossover operator;
    As similarity the first priority while disturben is less important, so mutation rate is configured to 0.4, a relatively small number.
    Besides, in order to control the strength of operation, operators are performed on low bits. The whole value of the encoded branch do not change too much.
  
Random number handle
    Random() generate evenly distributed numbers, in this algorithm, I need normal distribution. So the random generated number sequence need to be handled first befor using in GA operations.
 

 

文件: Research on 2D Fractal Recursive Algorithm Syncretized Genetic Operation.pdf
大小: 435KB
下载: 下载

阅读(364) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:Basic Taxonomy of Dynamic Data Race Detection

给主人留下些什么吧!~~