Luk-Sprint 6

This sprint we focused on taking Kinect skeleton points and applying to the 2D puppet, along with fix animation and element interaction.
This Kinect driven puppet was done by taking joint position and getting 2D angle between each point, and applying the puppet. I found one problem when it came to certain angle not being transferred properly.

float tracker::getAngle(ofVec2f a, ofVec2f b, float startAngle) {
float ang = PI/2 + atan((a.y - b.y) / (a.x - b.x));
if (b.x > a.x)
ang -= PI;
return ofRadToDeg(ang)+ startAngle;//returns angle between to joint points in degrees
}

Work around this was to have offset angle,that can over correct the initial. I want to looking into a better way to fix this and get more accurate angles.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s