In this project I will try to make as much as possible variations on the programs presented in the Generative Design book by Hartmut Bohnacker, Benedikt Gross, Julia Laub and Claudius Lazzeroni.
Generative Design Book
I do not know if I will be successful because the images and the original programs in the book are already on a very high level. I will just try to change as much as I am able to. This does not mean that my changes will lead to an improvement of the original code and images. My goal is to extend my basic knowledge of programming.
The horizontal position of the mouse controls the size of the color field. Starting in the center, the colored area is depicted with a height and width of 1 to 800 pixels. The vertical mouse
position controls the hue. The background passes through the color spectrum from 0 to 360, while the color field passes through the spectrum in the opposite direction, from 360 to 0.
The grid is created by two nested for loops. In the outer loop, the y-position is increased, step by step. The inner loop then draws a line by increasing the value for the rectangle’s x-position, step by step, until the entire width is processed. The step size is set by the value of the mouse position and is located in the variables stepX and stepY. It also determines the length and width of the rectangles.