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

  • Home
  • SEARCH
  • 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 9168737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:41:50+00:00 2026-06-17T15:41:50+00:00

I have installed GLUT and Visual Studio 2010 and found some tutorials on OpenGL

  • 0

I have installed GLUT and Visual Studio 2010 and found some tutorials on OpenGL basics (www.opengl-tutorial.org) and 2D graphics programming. I have advanced knowledge in C but no expirience with graphics programming…

For project (astronomy – time scales) , i must create one object in center of window and make other 5 objects (circles,dots…) to rotate around centered object with respect to some equations (i can implement them and solve). Equations is for calculating coordinates of that 5 objects and all of equations have parameter t (as time). For creating animation i will vary parameter t from 0 to 2pi with some step and get coordinates in different moments. If task was to print new coordinates of objects it would be easy to me but problem is how to make animation of graphics. Can i use some functions of OpenGL for rotation/translation ? How to make an object to move to desired location with coordinates determined by equation? Or i can redraw object in new coordinates every millisecond? First thing i thought was to draw all objects, calculate new coordinates, clear screen and draw all objects in new coordinates and repeat that infinitely..(it would be primitive but will work?)

Here is screen shot of that objects – http://i.snag.gy/ht7tG.jpg . My question is how to make animation by calculating new coordinates of objects each step and moving them to new location. Can i do that with basics in OpenGL and good knowledge of C and geometry? Any ideas from what to start? Thanks

  • 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-17T15:41:51+00:00Added an answer on June 17, 2026 at 3:41 pm

    Or i can redraw object in new coordinates every millisecond? First
    thing i thought was to draw all objects, calculate new coordinates,
    clear screen and draw all objects in new coordinates and repeat that
    infinitely..

    This is indeed the way to go. I would further suggest that you don’t bother with shaders and vertex buffers as is the OpenGL 3/4 way. What would be easiest is called “immediate mode”, deprecated by OpenGL 3/4 but available in 1/2/3. It’s easy:

    glPushMatrix(); //save modelview matrix
      glTranslatef(obj->x, obj->y, obj->z); //move origin to object center
      glBegin(GL_TRIANGLES); //start drawing triangles
        glColor3f(1.0f, 0.0f, 0.0f); //a nice red one
        glVertex3f(0.0, +0.6f, 0.0f);
        glVertex3f(-0.4f, 0.0f, 0.0f);
        glVertex3f(+0.4f, 0.0f, 0.0f); //almost equilateral
      glEnd();
    glPopMatrix(); //restore modelview matrix/origin
    

    Do look into helper libraries glu (useful for setting up the camera / the projection matrix) and glut (should make it very easy to set up a window and basic controls and drawing).

    It would probably take you longer to set it up (display a rotating triangle) than to figure out how to use it. In fact, here’s some code to help you get started. Your first challenge could be to set up a 2D orthogonal projection matrix that projects along the Z-axis, so you can use the 2D functions (glVertex2).

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

Sidebar

Related Questions

I have installed Visual Studio 2012 (aka 11) and uninstalled 2010. However I noticed
Used this tutorial I have installed jogl, jocl, gluegen, joal libs and added its
have installed Web Developer on Firefox 5.0 and personally found it redundant. would like
Where can I download original OpenGL SDK (not GLUT) for WindowsXP? I don't have
I have written a game that uses GLUT, OpenGL and FMOD. The problem is
I am trying to learn the basics of game programming and I have installed
I have GLUT installed, this is the code that I am compiling with GCC:
I have installed Android SDK and packages. Since I had an error when opening
I have installed my dependencies using bundle package Then transferred them to the offline
I have installed the following components of SQL Server 2012: management tools - complete

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.