1
\$\begingroup\$

I've modeled an earth using an sphere. I can rotate it using glRotatef function around z axix by incrementing the angle. How do I simulate earth's movement which looks like 23.5Degree around Z axis? (see this image)

I guess I need to calculate the x,y,z verctors. Any Idea? I'm a complete newbie in computer graphics programming.

\$\endgroup\$
2
  • \$\begingroup\$ Research quaternions and axis-angle rotation. \$\endgroup\$
    – notlesh
    May 18, 2012 at 6:58
  • \$\begingroup\$ you have to describe the earth's coordinate system after the 23.5 degree rotation and use axii from that coordinate system to feed the glRotatef \$\endgroup\$
    – dreta
    May 18, 2012 at 7:30

1 Answer 1

1
\$\begingroup\$

After applying the glRotatef to get the z axis rotation for time-of-day, call glRotatef again to get the tilt on the y (or is it x?)

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .