# Butterfly Effect(SuHwee & ZiFeng) Week 13 Final Milestone

Through this disastrous week, we focused on getting the the final batch of butterflies for the presentation, writing the max patch, Arduino code and also purchased a 19 inch monitor which got ruined by a single drop of raindrop and also, setting up the “habitat” for the butterflies in the acrylic case we made.

As for the butterflies, since we released all of our 8 butterflies last week due to the agreement with Mr Foo, the conservationist, we have 0 butterflies on hand for our project and as he agreed with us previously, he would give us in batches, and this week he direct me to a school teacher Sarah, who gave me two of the Leopard Lacewing Chrysalis. Since we know two is not enough, we decided to try our luck to catch some more butterflies a few days before the presentation just make sure they will be at least visually attractive for the final submission.

Both of the butterfly is female although we hope for them to be male which are more visually appealing. however, one of the two butterflies which Sarah gave us have deformed wings and is not able to fly very well. it is still relatively healthy other than that.

And we went to Yewtee park on 3 separate occasion, on the first occasion, we bought a short net which was unable to reach the butterfly and therefore we bought a long extension for the net the following day.

Problem: Not enough butterfly.
Solution: Catch them

During this week, we also use code that allows to use jit.blob and jit.op @absdiff to prepend in the colour in the frame and enable us to locate the center of the blob, the problem here is that we can only unpack the multiple blobs into one XYZ value. Therefore we looked online and tried many different patches and finally came to using [jit.spill @plane(number)] -> [unpack 0. 0. 0.] to unpack many blobs into many XYZ coordinate. hence enable us to track multiple blob’s location at once.

using those cordinate, we also followed a tutorial that taught us how to use jit.lcd, we use the cordinate from the blob centroid to draw the lines in the lcd, we also use timer function to change the RGB value of the lines created in the lcd

up till here, we found out from Prof LPD that we we cant or it is very hard to map many point that attract the particle system as they only “move to destination” but not really is “attracted to” the point. so we decided to find another patch to learn and build our patch on.

This is a screen shot of the final patch we used for the presentation.
just a day before the presentation, we decided not to use the particle system as we think it is not that more is better, it is the effect that we wanted that is important. basically, we found a way to change the camera to using external camera that we have(vdev/input), since the external web-camera is longer in the width, we decide to let it lie by the side and rotate the orientation and scale it accordingly to the screen size we have. (jit.rota) and also changed the original patch from a standard (importmovie colorswatch.png bang) to (qmetro 500 -> jit.noise 3 char 6 6) which produce a new 6 by 6 random RGB boxes every half a second and thus changing the effect of the fluid effect.

Next after we solved the fluid effect, we build the very simple code that uses (serial c 9600) to send a integer over to Arduino which is linked to a relay that controls the 220v table fan which turns off after 8000 ms

And that is roughly it for the codes that we wrote this week, we also settled the logistic part like the screen with a self made stand for the visual generated to be place under the butterfly casing, the flower for the butterfly to stay onto while adding to the overall visual appeal for the whole project, lastly we searched online for the species of butterflies we have and made a information about our project for the butterflies.

We purchased the second hand monitor on carousell and it was working, WAS. and then on the way to school while raining, a drip of rain water goes into the system and killing it once we turn it on. talk about unluckyness. so now, we’ve got a spoilt monitor screen, and we still need one so we searched online for more monitor, in the end we borrowed a 22inch monitor from the IT department which is slightly oversize but great nonetheless.

While I was doing this, SuHwee was arranging the flower carefully, although it may look easy to do so, having the balance and the need to consider the size and the butterfly is quite hard.

we put the screen and the butterfly box together, did up the information board to it and transferred the butterflies in, tore off the paper protecting the acrylic and we’re done!

We will update/upload the video for our project soon!

## Author: Ong Zi Feng

Just doing things, making stuffs.