View Full Version : Rotation of lines wrt x-axis

11-24-2009, 03:44 AM
Am drawing lines in xy plane,co-ordinates are in close range like
(-74.01244599,40.692543 ,0)
(-74.012445 ,40.6925639,0)
(-74.012365 ,40.692633 ,0)


i tried applying the above rotation on x axis.
Output looks like lines are being translated in -y axis. is it like camera is being moved up ?

i want to rotate lines(on xy plane) wrt x-axis(closer to xz plane).how can this be done?

11-24-2009, 05:05 AM
I'm not sure if this is the problem, but shouldn't you use "glRotatef"? What is glRotatex supposed to do? Are you using OpenGL ES?

11-24-2009, 08:47 PM
ya, am using opengl ES with fixed input. As i was posting in opengl forum,thought to post in float values.

is my understanding of camera pitch being rotated correct ?
i had referred this link for my understanding
http://www.songho.ca/opengl/gl_transform.html .

then how can i rotate the lines(objects) around x axis ?


12-03-2009, 10:15 PM
posting answer to my question.Might help to someone who looks this topic.

The whole set of lines which i tried to draw was being rotated wrt x-axis. But due to co-ordinates being very near it appeared to be translated along y-axis.

Its better we design coordinates symmetric around (0,0,0).then i set glortho around (0,0,0). After that i could rotate lines around xy-plane.