01-04-2005, 06:40 AM

Hello,

well, first to let you know, i nearly don't know anything about OpenGL. But I think knowing something about Vectors is useful, isn't it???

I want to use a Camera watching the Origin from a defined position on a sphere of a defined radius.

I thought this might be solved with gluLookAt.

The Point on the sphere is defined by to angles.

One specifies from where you look if you are on the ground (alpha) and the other defines how far you are away from the ground (beta). The radius of the sphere is the variable zoom

gluLookAt(cos(alpha)*zoom, -tan(beta)*zoom,sin(alpha)*zoom, 0,0,0 ,0,1,0);

0,0,0 is for the origin!

0,1,0 means that i am standing on the ground???

well, first to let you know, i nearly don't know anything about OpenGL. But I think knowing something about Vectors is useful, isn't it???

I want to use a Camera watching the Origin from a defined position on a sphere of a defined radius.

I thought this might be solved with gluLookAt.

The Point on the sphere is defined by to angles.

One specifies from where you look if you are on the ground (alpha) and the other defines how far you are away from the ground (beta). The radius of the sphere is the variable zoom

gluLookAt(cos(alpha)*zoom, -tan(beta)*zoom,sin(alpha)*zoom, 0,0,0 ,0,1,0);

0,0,0 is for the origin!

0,1,0 means that i am standing on the ground???