Rotation question

First here is code:

glPushMatrix
glRotatef 90, 1, 0, 0
glRotatef 30, 0, 0, 1
glRotatef 90, 0, 1, 0 //Point cylinder to the right
drawCylinder //draws cylinder at (0,0,0) and endpoint (0,0,3)
glPopMatrix

The question is: I don’t understand why x-axis rotation turns cylinder toward me (clockwise rotation) instead of rotating counterclock-wise??

what do you mean by turn to face you?, that the top of the cylinder is facing you?, if thats the case, then its alright, cause the glRotatef is always counter-clockwise, so along the x-axis it will be showing you the top of the cylinder on the positive z-axis and the bottom on the negative z-axis.

I don’t understand why x-axis rotation turns cylinder toward me (clockwise rotation) instead of rotating counterclock-wise??

right hand rule: point the thumb of your right hand in the positive direction of an axis and your fingers will curl in the direction of a positive rotation.

Originally posted by coredump:
[b] [quote]I don’t understand why x-axis rotation turns cylinder toward me (clockwise rotation) instead of rotating counterclock-wise??

right hand rule: point the thumb of your right hand in the positive direction of an axis and your fingers will curl in the direction of a positive rotation.[/b][/QUOTE]

I obviously have been rotating too much. Thanks.