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 4255852
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:16:26+00:00 2026-05-21T05:16:26+00:00

I currently can rotate around a pivot point by first translating to the pivot

  • 0

I currently can rotate around a pivot point by first translating to the pivot point then performing the rotation and finally translating back to the origin. I do that easily enough for the shoulder in my example. However I cannot figure out how to also add in a rotation around the elbow for the forearm.

I’ve tried the following for the forearm rotation around the elbow:

  1. translate to shoulder, rotate, translate to origin, translate to forearm, rotate, translate to origin
  2. translate to shoulder, rotate, translate to forearm, rotate, translate to shoulder, translate to origin

Neither work for me. Any suggestions? I’m really stuck on this one.

  • 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-05-21T05:16:27+00:00Added an answer on May 21, 2026 at 5:16 am

    I ran into a similar problem when I was doing some skeletal animation. It’s very helpful to use recursion for this. Also, structure your bones hierarchically (e.g. shoulder is a parent of forearm which is a parent of hand, etc.). By doing that you can write your code as follows:

    void drawBone(Bone *root) {  
        if (!root) return;  
        glPushMatrix();  
        glTranslatef(root->x,root->y,0);  
        glRotatef(root->a,0,0,1);  
        // insert code to actually draw bone here  
        int i;  
        glTranslatef(root->l,0,0);  
        for (i=0; i<root->childCount; i++)   
            drawBone(root->child[i]);  
        glPopMatrix();  
    }  
    

    My bone struct looked like this:

    typedef struct _Bone {  
        float x,y,a,l;    // position, angle, length of bone  
        int childCound;   // number of children for this bone  
        struct _Bone *child[MAX_CHILD_COUNT], *parent;  
    } Bone;  
    

    This website is a great resource for skeletal animation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently writing a little bootstrap code for a service that can be
Currently, we're storing the user's HTTP_REFERER so we can redirect the user back to
I need to be able to rotate an image around a given point so
I am trying to make a very simple object rotate around a fixed point
I have a simple 3D cube that I can rotate using the following code:
How can I check the umask of a program which is currently running? [update:
How can I send keyboard input messages to either the currently selected window or
I currently have a site where different users can login, and depending on their
How can I access Class object for Generics? Currently, I am doing it this
I currently use a DataTable to get results from a database which I can

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.