Coding a Pattern Maker

Date : September 16, 2011

 

Concept: I love patterns. In the past year, I explored a lot with creating patterns from simple shapes. I really started to notice that the most complex patterns start off a very simple design that can be copied, mirrored, and arranged to create a complex image.  I wanted to make it possible for anyone to create their own patterns using their own images.

Changing Background Color: My code allows the user to go between any number desired images.  I have chosen to use two. The program gives the user ability to change the background color using the ControlP5 library.  I used the code that was found in the Color Picker example. I also programmed clockwise rotation, clear, and key pressed functions to change the color (red, blue, green, white) of the objects placed. These are images of what It looks like after picking your background color, and then deciding to change the pattern color to green. Here is the code, and below you will find a video.

Changing Object Color: It would not only be great to change the background color, but also able to change the object color using the ControlP5 library. I tused code from the Toggle  File to do this, however I was unable to fully complete this. I successfully changed the pattern color, but I was unable to toggle between changing the pattern and the background. By clicking on the left side of the Toggle button, the user can change the color of the pattern.  By clicking on the right side, I was only able to program my code to use the key press functions to change the background, NOT by using the color picker library. Here is the code,  and below you will find a video.

 

Problems: After a lot of trial and error, I was still unable to successfully to get both functions working with the same color picker and toggle.  I also discovered that using the mouseClicked function was a problem when trying to toggle back and forth, because each time I clicked, it would place a shape in an undesired place by the toggle bar. This needs to be fixed.

References: Here are a list of websites I read to try to help me understand and write my code: ControlP5 libraryLearningProcessing.com, Processing.org


@