#lang racket ;DESIGN STATEMENT ; ; Through this project, we have decided to do a study of the interplay of color variations ; and shapes. We have decided to pursue this direction in an attempt to better understand ; the impact of color in our perception of art. To achieve this, changes in color value will ; play a key role. The image is divided into three layers: the background, the foreground ; shape, and the fractal shape. The foreground shape's color is complementary to ; that of the background and the fractal shape. It will be centered on the background, ; making the image balanced. Its symmetry will serve to create unity in the piece, as will ; the fractal shape. The latter one will be a suggestion of a rectangular shape, super-imposed on ; the foreground shape. Imposing itself on top of the foreground shape whilst contrasting its color through ; imitating the same hue as the background, the fractal shape is the emphasis of ; the composition. The colors of each one of these elements will be constructed in a manner ; that distinguishes them from each other while at the same time working together to achieve ; artistic harmony. Moreover, we believe that by using ; three simple elements (the background, the foreground shape, and the fractal shape) paired with their modifications, ; a minimalistic approach to this art will allow the viewer to grasp more effectively the effects of the colors and ; the shapes in their perception, thereby censoring any possible distractants from the main purpose of our study. ; ;TECHNIQUE STATEMENT ; To facilitate the reading of the Technique statement, we have decided to break it down into sections: ; ;PRE-NOTES: ; The image onto which the art piece will be displayed is created through a call to (image (image-new width height)) ;BACKGROUND ; In order to determine the background color, we have decided to use a combination of conditionals, predicates, and modulo. ; The (cond) procedure will pass the value of n to each of the tests until it fulfills one of these. ; Each test has an assigned color value. Through the use of a (let) statement, the procedure is able to "rename" the ; assigned color "bg-color".In other word, If (equal? (mod n number) number) holds, then the assigned color to that test will be ; named within the procedure "bg-color". ; Once "bg-color" is defined, the effect applied to this color is chosen through another (cond) statement that uses the same ; process. Each test has an assigned effect, if the test holds, the effect is applied to "bg-color". The possible ; effects are: SOLID COLOR, HORIZONTAL BLEND--WHITE TO COLOR, HORIZONTAL BLEND--COLOR TO WHITE, VERTICAL BLEND--WHITE TO COLOR, ; VERTICAL BLEND--COLOR TO WHITE, BLACK, WHITE, DIAGONAL BLEND 1, DIAGONAL BLEND 2, DIAGONAL BLEND 3, and DIAGONAL BLEND 4. ;Once the background color has been defined and undergone the effects, the Foreground is created. ;FOREGROUND ; In order to choose the foreground figure, the procedure uses a call to (cond). Using the same structure of ; (equal? (mod n number) number), each test has an assigned procedure that will result in specified shape. This shape is ; rendered using a call to (image-fill-selection!). The image and positions onto which the figure will be created have ; been defined already. As for the color of the resulting foreground shape, another let statement has been applied in which ; the color is defined as [shape-color (irgb-complement bg-color)]. This (shape-color) is then used as the parameter for ; (context-set-fgcolor!). Finally, a call to (image-fill-selection!) is made to finish the foreground shape. ;FRACTAL SHAPE ; To produce the third element of this image, a turtle is defined at the very beginning of the procedure. Nevertheless, ; no instructions are given to the turtle until after the foreground shape is finalized. To use the turtle, the procedure ; makes a call to (turtle-teleport!) to appropriately position the turtle as for its resulting figure to be super-imposed ; onto the foreground shape. As mentioned, the turtle's color is assigned bg-color through a call to (turtle-set-color!). ;In order for the turtle to make a rectangular-suggesting figure, the procedure calls ; an externally defined procedure named (turtle-sierpinski-rectangle!) which in turn makes a call to another externally ; defined procedure named (sierpinski-a!). The fractal level of the figure will depend on (increment (mod n 3)). ; We decided to define (Sierpinski-a!) and (turtle-sierpinski-rectangle!) outside of (image-series) because otherwise it ; the procedure's body would be very complicated to read. ;Final notes: ;There is a possibility of 1,155 different images with this algorithm because (* 7 11 5 3).