I have to apologize for all the Processing stuff lately. The truth is I have been really getting inspired by it. Add to that the fact that I’ve been working late the past few nights and it seems like the perfect choice. Tonight, I made some real progress. I challenged myself to create something specific and I searched out the reference material to make it happen. I didn’t accomplish everything I set out to do which is why you will see three sketches below instead of just one.
The idea began with the interest in making a “for” loop which would, when mouse pressed, create a series of circles each 10 pixels larger than the next. I had trouble making it work in time. What would end up happening is I would press the mouse and instantly all the circles would appear at once rather than one after the other. That’s when I hit the reference material and found a function called “millus”. Millus stands for milliseconds and it allows you to trigger code at any point within time. It took a little finagling to get it to work but thanks to the Learning Processing book it eventually did.
After I finally got it working I decided to go into the sketch and change the circle into a rectangle and then into a line. Each shape had it’s own unique quality. I wanted to set a keyboard command to switch between the shapes but that is where I couldn’t go any further. I plan on implementing it once I get to the bottom of how it’s done but for the meantime I decided to just post all three sketches for you to play with.
The circular one is my favorite but sometimes I think the line one is the best. Oh well.
Have fun!
The Circular Sketch: To begin, click and hold the mouse in position to see the circles appear. Then play with mouse movement. The ‘z’ key will clear the screen. The ‘a’ key will add the second effect and the ‘s’ key will remove the second effect.
The Rectangular Sketch: This one works the same as the first.
The Line Sketch: This one works similarly to the two above but you will notice the behavior of the line is a little unexpected.
Comments
One response to “Day 166 / Deeper into Processing”
That was fun. nice programming