Im trying to one thing thats too difficult …
how to rotate like earth … i dont want to know a rotate in axis …
for example … when we talk about graphs you can see what im talking about
imagine an axis x with minimum 0 and maximum 5 … if we do a half-rotate 5 will become -5.
i dont want this, i want 0 in the position of 5 and 5 in the position of 0.
I did not understood a word
Well I will try to be creative and interpret your title. Do you want something like :
glloadidentity;
rotate X axis (an horizotal one) to 23.45° to reflect the earth axial tilt;
rotate Y axis (the vertical one) to a value depenting on the time linearly (ie 24 hours for 360°);
draw earth;
So the initial triangle has its bottom left vertex aligned on yx (0;0). You just have to shift it a bit.
may be done like this :
glPushMatrix();
<draw triangle>
glRotate(180, 0,0,1);
<draw triangle>
glPopMatrix();
may be done like this :
glPushMatrix();
glTranslate2f(-1.0f,0.0f); // if the triangle is about 2 in width. Else adjust for your setup.
<draw triangle>
glPopMatrix();
glPushMatrix();
glRotate(180, 0,0,1);
glTranslate2f(-1.0f,0.0f); // if the triangle is about 2 in width. Else adjust for your setup.
<draw triangle>
glPopMatrix();
Untested, but should not be too far from the truth.