Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9236359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:16:24+00:00 2026-06-18T07:16:24+00:00

I am working in Kinect and I am trying to find the angels between

  • 0

I am working in Kinect and I am trying to find the angels between joints, for example: the angle of elbow in Z and Y coordinated. i found this code for calculating angles in X and Y coordinate but It did not works well because i do not know what is the “rotational offset” is.
http://www.embedded101.com/Blogs/JamesYWilson/tabid/70/entryid/167/Default.aspx

I read about some codes that in stackoverflow such as the bellow but it did not works well and I did not understand how they did not ignore the z value.

/// <summary>
/// Return the angle between 3 Joints
/// Regresa el ángulo interno dadas 3 Joints
/// </summary>
/// <param name="j1"></param>
/// <param name="j2"></param>
/// <param name="j3"></param>
/// <returns></returns>
public static double AngleBetweenJoints(Joint j1, Joint j2, Joint j3)
{
    double Angulo = 0;
    double shrhX = j1.Position.X - j2.Position.X;
    double shrhY = j1.Position.Y - j2.Position.Y;
    double shrhZ = j1.Position.Z - j2.Position.Z;
    double hsl = vectorNorm(shrhX, shrhY, shrhZ);
    double unrhX = j3.Position.X - j2.Position.X;
    double unrhY = j3.Position.Y - j2.Position.Y;
    double unrhZ =j3.Position.Z - j2.Position.Z;
    double hul = vectorNorm(unrhX, unrhY, unrhZ);
    double mhshu = shrhX * unrhX + shrhY * unrhY + shrhZ * unrhZ;
    double x = mhshu / (hul * hsl);
    if (x != Double.NaN) 
    {
        if (-1 <= x && x <= 1)
        {
            double angleRad = Math.Acos(x);
            Angulo = angleRad *(180.0 / Math.PI);
        }
        else
            Angulo = 0;


    }
    else
        Angulo = 0;


    return Angulo;

}


/// <summary>
/// Euclidean norm of 3-component Vector
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="z"></param>
/// <returns></returns>
private static double vectorNorm(double x, double y, double z)
{

    return Math.Sqrt(Math.Pow(x, 2) + Math.Pow(y, 2) + Math.Pow(z, 2));

}

pleas could someone help me in that

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:16:25+00:00Added an answer on June 18, 2026 at 7:16 am

    I found the method that i was looking for 🙂

    public static double myMethodZY(Joint j1, Joint j2, Joint j3)
        {
            Vector3 a = new Vector3(0, j1.Position.Y- j2.Position.Y, j1.Position.Z- j2.Position.Z);
            Vector3 b = new Vector3(0, j3.Position.Y - j2.Position.Y, j3.Position.Z - j2.Position.Z);
            a.Normalize();
            b.Normalize();
            double dotProduct = Vector3.Dot(a,b);
            double angle= Math.Acos(dotProduct);
            angle =  angle * 180 / Math.PI;
            //angle = 180 - angle;
            return angle;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working Example: This is almost identical to code I use in another places on
I'm working in the skeleton basics sample WPF application C# found in the kinect
I am working with Kinect and am trying to take in depth data and
Lately I have been working on trying facial recognition with the Kinect, using the
Working on THIS Page: newsite.702wedding.com/live/ Can't find where to remove the arrows at the
Working through this for fun: http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/ Example calculation of nullable and first uses a
I am working on a Kinect project that requires me to prompt the user
I am working on a Kinect game where I am supposed to dress the
I've been working with the Kinect and Voice Recognition, and I'm noticing that I
I'm working on a class project which is using a Kinect. According to the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.