Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

184
Views
Calculating Angle from 3D Coordinates

I am working with a pose estimator that is giving me (x, y, z) for each joint. I am attempting to calculate angles based on these and running into some issues.

 const find_angle = (Ax,Ay,Az,Bx,By,Bz,Cx,Cy,Cz) =>
{
    var AB = Math.sqrt(Math.pow(Bx-Ax,2)    +   Math.pow(By-Ay,2)  +  Math.pow(Bz-Az,2));    
    var CB = Math.sqrt(Math.pow(Bx-Cx,2)    +   Math.pow(By-Cy,2)  +  Math.pow(Bz-Cz,2)); 
    var AC = Math.sqrt(Math.pow(Cx-Ax,2)    +   Math.pow(Cy-Ay,2)  +  Math.pow(Cz-Az,2));
    
    const radians = Math.acos((CB*CB+AB*AB-AC*AC)   /   (2*CB*AB));
    const angle = (Math.abs(radians*180.0/Math.PI))
    console.log(angle)
}

// Knee
find_angle(101, 166, 409, 107, 209, 790, 115, 248, 9564)

// Ankle
find_angle(100, 259, 1549, 97, 299, 9471, 95, 315, 1575)

Ouput:

enter image description here

The Knee output looks correct to me but Ankle does not. I was expecting an angle in the range of 70-90. I'm wondering if this function is too simple for what I am trying to do or what improvements could be made to make it consistent across all joints. User is facing the camera while pose is being estimated.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!