HOME BLOG ABOUT ME

## Image Reconstruction with Polygons

Developing an application to build an image from overlapping polygons to resemble an original image.

### Requirements

(1) Use a collect of polygons to produce an image close to a chose original image

(2) Use a genetic algorithm to find the best arrangement of polygons

(3) Provide an interface to allow the user to interact with the algorithm

(4) Graphically display the state of good fit genomes with appropriate statistics showing progress toward the goal

(5) Allow modifications of parameters, operators, and probabilities

(6) Add own parameters to the genome

(7) Explore various measures of "best" fit

(8) Save the best arrangement from some number of iterations

(9) Provide comparison data for various configurations of input parameters

## Scope Analysis

Application: With ease of use

The goal of the application is to allow the user to interact with the algorithm. The process of creating the interface consist of three major steps: design, testing, and implementation.

(1) Design begins with pen and paper. Then, using WinForm, the interface will be created.

(2) Testing refers to testing ease of use - does the time gained in functionality exceeds the time lost in learning? (Brooks, 43)

(3) Lastly, implementation. This is the finished application with the genetic algorithm implemented into the interface.

__________________________________________________________________________________________

Polygons: Of all sorts (but starting with triangles)

Polygons are the shapes which will be used to create the images. The polygons will be of various sizes, colors, and transparencies. To start, all shapes will be triangles. As I progress, I will implement more polygons.

(1) Drawing. First, triangles simply need to be drawn on the screen. Blending is the next step. Once drawing and blending are working, the points and colors for each polygon will be generated at random.

(2) Blending will allow overlapping polygons of various colors and transparencies to create new colors.

(3) Classes and Functions. Classes for each type of polygon will be made, as well as function to generate the points and colors for each polygon, as in step 1.

(4) New polygons? Further down the line, I will consider adding new polygons to individuals - this will be determined once I have a working algorithm.

__________________________________________________________________________________________

Genetic Algorithms: Where Biology and Computer Science meet

(1) Challenge #1 - Understand genetic algorithms!

(2) Selecting initial parameters and operators is the 2nd step. This will allow me to test the genetic algorithm with hardcoded values, which will eventually be user input.

(3) Challenge #2 - Code the genetic algorithm! Coding includes 4 primary methods: scoring, selection, cross-over, and mutation

## Timeline