# Search:

Type: Posts; User: andre_arjun

1. ## Thread: c program using opengl for oscillating pendulum

by andre_arjun
Replies
10
Views
5,218

### Im sorry, thats theta+=10.0 and theta-=10.0. I...

Im sorry, thats theta+=10.0 and theta-=10.0. I just need to show that the pendulum (or the object that I've created) rotates to a particular angle, say 0 to +90 degrees and back to -90 degrees in a...
2. ## Thread: c program using opengl for oscillating pendulum

by andre_arjun
Replies
10
Views
5,218

### I tried lot of alternatives. A for loop in the...

I tried lot of alternatives.
A for loop in the idlefunc oscillate() to rotate till +90 and then back to -90:
void oscillate()
{
int i;
for(i=0;i<=90;i+=30)
theta+=30;...
3. ## Thread: c program using opengl for oscillating pendulum

by andre_arjun
Replies
10
Views
5,218

### Alright, I figured the rotating out. Translate...

Alright, I figured the rotating out. Translate the figure to the origin, rotate and translate back. That works. But now I have a problem with limiting the angle of rotation. I declared a global...
4. ## Thread: c program using opengl for oscillating pendulum

by andre_arjun
Replies
10
Views
5,218

### Well, I understand the multiplication of the 3...

Well, I understand the multiplication of the 3 matrices to achieve the rotation but I dont understand how to construct a matrix for translation/rotation. Could you please help me with it? This is my...
5. ## Thread: c program using opengl for oscillating pendulum

by andre_arjun
Replies
10
Views
5,218

### Yes, its a homework task. I've just started...

Yes, its a homework task. I've just started working on the drawing code. I don't know much about OpenGL, just a beginner. If not the code for the entire program, I'd at least like an idea on how to...
6. ## Thread: c program using opengl for oscillating pendulum

by andre_arjun
Replies
10
Views
5,218

### c program using opengl for oscillating pendulum

need a program for an oscillating pendulum - a sphere suspended to the end of the thread that can oscillate about the fixed point at the other end of the thread. need the code. im creating the sphere...
Results 1 to 6 of 6