For my midterm project, I decided to explore relations between attractors & movers in the code. Fortunately, I had zillion ideas, unfortunately, also had way too less skills to achieve the result what I wanted.
Tried to play with fractals, processing and three.js,
Not everything was successful, but I definitely learned a lot
Finally, I decided to focus on the ‘attractor’ example and modify it to make a nice visual effect.
My goal was have a system of movers, flying randomly on the screen. Then, slowly, they were supposed to create a hidden image.
To make it happen, I prepared a few png & jpg files, that were about to be presented by movers. After importing them into p5, I wrote a nested loop, that iterates through each pixel of the image. Each one, having the RGB value bigger than 0 and smaller than 254 was meant to attract elements of the particle.
Once it finally worked, I decided to add some functions to the mouse and keyboard. I just wanted to totally mess up the drawing and redraw it again when the mouse is pressed.
The key changes the image to another one from the array. Once we reach the last one, we go back to the 1st one.
For our first week assignment, I decided to practice Random Walker and Noise.
Here’s what I came up with :
Later,I tried to experiment with steering walker toward different directions using mouseX and mouseY. Also, to add another feature i set up ‘keyPressed()’ to help centralize random walker in the middle of the screen again.
This week I continued practicing organizing my code. I had many ideas, of what I could create, but then finally decided to listen to my heart.
There’s one thing I really miss in NYC – I have never see the sky fill with stars at nigh here. I used to see it back in Poland, but unfortunately, the light pollution of the city prevents the stars from being visible. Dreaming about my lovely night, I started creating my own, p5 night sky.
Practicing arrays, loops and functions, I ended up with a nice night sky, full of my beloved stars. To add some magic, I decided to add some movement to the stars, which move in circle.
That was a good opportunity to practice ‘sin’ and ‘cos’.
Moreover, I wanted my project to be more educative, so I singled out stars, which creates constellations. Here, I added a small drawing simulating animation, which one by one, shows constellations on a sky.
I came up with this funny idea of a game. The goal is to get to the other side of the road without touching any other dot. Each touch increase our size, making it even more difficult to pass.
Here’s how it looks like when you succeed:
Moreover, if we’re feeling strong enough we can make the game harder by adding more ellipses to the game. To be able to do it we must click and drag the mouse through the canvas.
but… this is a total hardcore. Free drinks to anyone, who’s gonna pass it!
This game is my introduction to Object Oriented Programming . I really wanted to learn it. And although I’m still very confused with this topic , with a great guidance of Moon, I was able to program this game in more professional way . I still need to practice this. It’s still very fresh for me. I didn’t let myself to add more options, even though I had 12345 crazy ideas of how to improve it!
I will do it next time, as a reward for myself that I can use arrays and feel comfortable with Object Oriented Programming.
I came up with this weird idea, and decided to practice my p5 skills a little more. Firstly, I wanted to create some ellipses, which would follow the cursor with a different delays.
Then, inspired by clock and solar system, I made some randomly shaped circular paths, for another set of ellipses.
The ellipses in the background use nested loop function. To make it more fancy, I made this ‘flashing’ effect by setting ellipses’ opacity to random.
I also added two additional ‘hidden’ features, which plays more with the background.
Surprisingly, one of the most important thing I’ve learned thanks to this sketch, is that I definitely should write my code in an organized way! I created so many variables, so many elements that I almost got lost! I need to work on that a lot…