PDA

View Full Version : coordinates



mikethebike
12-22-2011, 01:28 AM
Hi
I draw in 2D with glpoints x, z. Now how to rotate that view to get a 70' side view?
pitch (http://www.songho.ca/opengl/gl_anglestoaxes.html)
So I do as above pitch rotation but which points do I draw in 2D? Confused...
Thanks

thokra
12-22-2011, 05:02 AM
What's a 70 side view? Could you please state what you're trying to do?

mikethebike
12-22-2011, 07:16 AM
I'm drawing with glvertex2f glpoints in 2D(looking from above). I've x,y,z points and want to look from the side and not from above. (like flying into a valley seeing mountains on the side)
What/how exactly would glvertex2f look for that?
Many thanks

thokra
12-22-2011, 09:47 AM
So if I get you right, you basically want something like a hallway? The choice of glVertex2f and the desire to obviously create an illusion of a 3D world perplex me.

mikethebike
12-22-2011, 10:06 AM
It's a moving map in 2D for an airplane and i get x,y,z from a terrain probe. So my problem is only to move from x,y topview to a side view somehow. I've previously tried glrotate for heading but got some black/background glpoints. Maybe I simply need to know what/which and how to display x and or y and or z axes.
for topview I only do
for x < mapsize
for y
glvertex2f(x,z)