MLNI-Week #6 Assignment: Interactive Portraiture —— Lishan Qin

Overview

For this week’s assignment, I utilized the uNet library to develop an interactive game with the players’ interactive portraiture. The purpose of this game is to ask the players to use the coins to build a portraiture covered by coins. Basically the players need to get as many coins as possible and at the same time avoid all the monsters. When the coins touch the player’s portraiture, it will stay on the portraiture. The more time the coins are on the portraiture, and the more coins there are, the higher score the players get. Whenever the monster touches the portraiture, the players lose 10 HP. When the HP equals 10, the game is over. The code can be found here.

Problem

I myself never actually win the game and successfully build a portraiture with coins… So the game is probably too difficult. The most successful time I got is when almost half of my body is covered by the coins…The difficulty of this game still needs modification.

MLNI – Cut The Ball (Billy Zou)

Cut The Ball

In this assignment, I combined ml5.js with p5.js and developed a simple interactive game, with the help of PoseNet.

Basically, the player should cut the circle with his/her nose. Position of player’s nose is tracked all the time. When player’s nose penetrate a circle, the circle will be destroyed.

Nose Detection

Nose is detected using PoseNet.

Among all body parts, I picked the nose and saved its position in an object. This object would also be used by circle objects to detect penetration.

Penetration

Penetration is divided into to parts. The first part is nose coming from outside the circle and the other part is nose leaving the circle. If both conditions are satisfied, a penetration is detected. Then, the ball will be destroyed and the system will record this action as a successful cut.

Limit Objects

There are two parts in this program that require object limit. First is cleaning the circle cut or expired. Since there will be at most 1 big circle on the screen and a new circle will be generated every 5 seconds. What I did was not displaying the circle when it was not available and when a new object was assigned to the variable, the old one would be cleaned automatically.

When a circle is cut, there will be an explosion effect. In fact it is hundreds of small circles. All circles will be removed after 1 second. Of course they are stored in an array first, and finally the array will be emptied.

I find that what PoseNet does is quite similar to Kinect SDK. I am looking forward to utilizing more interesting machine learning modals.

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

MLNI Week 4 HW Tiger Li

I started off wanting to create an animation based on the movement and relationship between hands because the hands are a body part that we use the most to control and move things naturally. To me, it was the more user-friendly option to use in comparison to nose ears or shoulders. 

I approached the coding part the same way as shown in the professor’s demo. Using points of input from the body tracking program in a similar way as using the X and Y coordinates of the mouse. 

The only thing next is a creative graphic to put on the screen for the user to control. After getting some inspiration from other interactive graphics online. The idea of playing with size change and color stood out to me. I wanted to simulate a ball of energy in the users’ hands like naruto. So I decided to go with ball design.  As the user moves there hand around the size and location of the graphic would change. Moving around in a circular motion would male it seem like the light blue ball is on top of the dark blue ball.  

MLNI Pose Net: Sebastian Lau

I took inspiration from Professor Moon’s example with the circles coming out of the ears. Instead, I wanted it to make it look like you were underwater by changing the circles to blue and changing the trajectory of the circles from left and right to straight up. 

Initially, I wanted to make it so that the blue circles (meant to represent bubbles) came out of your mouth. Unfortunately, pose Net didn’t have an identifier for the mouth so instead I used the nose.