This document describes a genetic algorithm for generating vector drawings. It includes classes like DNADrawing, DNAPolygon, and DNAPoint that represent drawings, polygons, and points. The algorithm initializes a random chromosome, then mutates it by adding, removing, or moving polygons and points. It evaluates fitness by comparing pixel colors to a source image. The process repeats, mutating and evaluating generations until a termination criteria is met.
4. Polygons Overlap
Vertex
3<Vertex<=10
ARGB
0<=Color<=255
0<Polygon<=255
X,Y Field Structure Point
Index Node Link List
0<Index<255
5. DNADrawing DNAPoint
Init();
Mutate();
Init();
addPolygon();
Mutate();//move point
movePolygon();
removePolygon();
LinkList<DNAPolygon >
Int x,y;
Polygons;
DNAPolygon DNABrush
Init();
Mutate(); Mutate();//for each color
addPoint();
removePoint(); Int Red;
Int Blue;
Int Green;
LinkList< DNAPoint > Polygons; Int Alpha;
Brush brush;
6. Create initial random
chromosome
Mutate the chromosome
Mutate gens
No
Evaluate fitness Yes Stop
Termination criteria satisfied?