For second week of Nature of Code class, I was playing out with forces:
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.
Firstly, my Partner Anne and I considered making a physical object – a box of grass that moved as if being blown by the wind when people walked past. Then, after a brainstorm we both agreed to move the project to the screen.
It was a challenging task in terms of programming. That was the first time I had to use particle system.
I started with drawing a dandelion piece in Adobe Illustrator and saving it as a svg file. Then, I tried to loop it in few circles, just to create dandelion shape.
While I was working on design and programming, Anne figured out a lot about the sensors.
At first, we purchased a PIR motion sensor, but it turned out to be way to sensitive. Then, we discovered the Distance Measuring Sensor which seemed perfect for our task, though we did not need to measure distance, because we were able to adjust the level of sensitivity.
She did a great job by getting sensors to work.
Also, I laser cut and etched the lid for our ‘sensor box’.
Finally, we connected both out works, and ended up with a beautiful final effect.
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 also added 2 hidden features:
mouseDragged – adds more falling stars
keyIsPressed – displays constellations’ names
Link to sketch HERE
Have fun learning!