MLNI week4 assignment

Shenshen Lei

sl6899

For this weeks project I created a program that combines the p5.js sketch and the poseNet. The code generate random bubble one the top while the bubble fall freely. The camera will recognize the position of nose. There will be a sharp triangle move following the nose position to break the bubble when the angle touches the bubble. The code is simple, but I faced with some problems while coding. I put the “nose” function in the Particle class which means that each time a new bubble generate will a new triangle. This slowed down the speed of the program. Another thing is that I first put

this.nosex= p.position.x

this.nosey=p.position.y

out of the if function, but the bubbles did not disappeared. Lab assistant helped me solve the problem but I am still a little bit confused about the logic of the code. I hope to create more program that achieve more complex functions.

The link of my complete program:

https://drive.google.com/open?id=1PV5iZwnuoTm2d25K-i6EZGgSP7Oi7i8J

Leave a Reply