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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:49:31+00:00 2026-06-15T04:49:31+00:00

I am trying to create some rotation animations in my projects with objects. Currently

  • 0

I am trying to create some rotation animations in my projects with objects.

Currently to animate the objects, I have written some tween functons which take the params as value from, value to, value time and tweens the object from from Param to to Param and tween the objects movements in the given time. However, I am need to creating some animations which look like the following:

enter image description here

The objects have to be tweened in rotation around a certain side. So, if go by this algorithm, something like:

for(int rotationAmount = 0;rotationAmount<=90;rotationAmount++){
glPushMatrix();
glRotatef(rotationAmount,1,0,0);
Rectangle(500,500,200,100);
glPopMatrix();
}

I still don’t get the required effect, since the Rectangle instead of rotating around a certain side looks like rotating around the circumfrence of some big circle and coming back. Would really welcome some suggestions here on how to achieve the above?

  • 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-15T04:49:32+00:00Added an answer on June 15, 2026 at 4:49 am

    glRotatef multiplies current matrix by rotation matrix. Rotation matrix rotates around orign of coordinates. You need to transtate orign to the side of the object, perform rotation, translate back.

    point_type point_on_the_side;
    for(int rotationAmount = 0;rotationAmount<=90;rotationAmount++){
        glPushMatrix();
        glTranslatef(-point_on_the_side.x, -point_on_the_side.y, -point_on_the_side.z);
        glRotatef(rotationAmount,1,0,0);
        glTranslatef(point_on_the_side.x, point_on_the_side.y, point_on_the_side.z);
        Rectangle(500,500,200,100);
        glPopMatrix();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create some simple polygons in openGL3.3. I have 2 types
I am trying to create some div (that should be buttons) that have rounded
I'm trying to create some cascading drop downs. I have my States loading via
I have been trying to create some dynamic Xaml. I have the following c#
I am trying to create some cucumber features with references to other objects. I
I'm trying to create some kind of callback code which gets executed after an
I'm trying to create some kind of a server which allows me to start
I am trying to create some capacity planning reports and one of the requrements
So I'm trying to create some graphs using Core Plot, but for the following
I am trying to create some reusable components in Silverlight2 . The difficulty comes

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.