Evolving an image, part II - image rendering
The second installment in the series on evolving an image with trianges. In this post I will focus on the rendering of the actual image, both for rendering and scoring. Other parts of this series are: Make a generator for the genome. Translate genome to a rendered image. Score the rendered image and compare for evolution. (Optional) Possible optimizations. Scoring generations is done by comparing their matrix representations. At the start of the project I started pretty much blank on the rendering of polygons in python. The Pillow package is primarily meant for graphical implementations, not matrix algebra. My path of drawing polygons on a canvas and then turning the canvas into a matrix representation could just as easily have been reversed. When everything was implemented, the performance wasn't optimal and I looked into mathematical generation of polygons with the shapely module. For now, let's focus on drawing polygons on the canvas. python; genomeGenerator.py ...