Optimization of String Rewriting Operations for 3D Fractal Generation with Genetic Algorithms
String rewriting is a modification of the idea for the context-free grammar. Modification consists in the fact that there is not separation on terminal and nonterminal symbols. Each symbol in string rewriting, is considered as nonterminal and it can produce longer sequence. By this way infinite structures are created as fractals. In a video presentation by Jack Hodkinson the use of 2D images instead of text symbol pixels is suggested. Each pixel (geometric square) is divided in nine sub-squares. The color of the pixel determine the pattern in which the nine squares are arranged. By this way each pixel gives a rule for subdivision of the containing area. Hodkinson gives a method, to setup the fractal, to reproduce a particular 2D image (for example, the glyph of the Greek letter \(\pi \)). This problem is well known in the fractals theory as Fractal Inverse Problem (FIP). It is an optimization problem, so a good option is the use of genetic algorithm (GA), to assemble set of rules, for string rewriting with 2D pixels. Series of experiments with the size of substitution matrix (not only 3 \(\times \,\)3, but also 2 \(\times \,\)2 and 4 \(\times \,\)4) are done by Hodkinson. Also are made series of experiments with different number of colors, starting with black/white and reaching the final successful experiment with thirty shades of blue.
KeywordsFractal Inverse Problem Genetic Algorithms String rewriting
This work was supported by private funding of Velbazhd Software LLC.
- 4.Shonkwiler, R., Mendivil, F., Deliu, A.: Genetic algorithms for the 1-D fractal inverse problem. In: Proceedings of the Fourth International Conference on Genetic Algorithms, pp. 495–501. Morgan Kaufmann (1991)Google Scholar
- 6.The Apache Software Foundation: Genetic Algorithms - Apache Commons (2018). http://commons.apache.org/proper/commons-math/userguide/genetics.html
- 7.PrintingIn3D: Printing in 3D - JavaSCAD (2018). http://www.printingin3d.eu/javascad
- 8.Balabanov, T.: The idea of Jack Hodkinson for fractal generation implemented in 3D version (2018). http://github.com/TodorBalabanov/Jack-Hodkinson-3D-Fractal
- 9.Shonkwiler, R.: Parallel genetic algorithms. In: Proceedings of the Fifth International Conference on Genetic Algorithms, pp. 199–205. Morgan Kaufmann, CA (1993)Google Scholar
- 10.Vences, L., Rudomin, I., Carretera, K., Guadalupe, L.: Genetic algorithms for fractal image and image sequence compression. In: Proceedings of Comptacion Visual, pp. 35–44 (1997)Google Scholar
- 11.Al-Bundi, S.S., Al-Saidi, N.M., Al-Jawari, N.J.: Crowding optimization method to improve fractal image compressions based iterated function systems. Int. J. Adv. Comput. Sci. Appl. 7(7), 392–401 (2016)Google Scholar