Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Sine/Cosine wave for sunrise and sunset

  1. #1
    Junior Member Newbie
    Join Date
    May 2012

    Sine/Cosine wave for sunrise and sunset

    I'm working with opengl to create a sunrise and sunset based on the actual times. I'm having trouble coming up with a sin/cos formula that goes from -1 to 1 to -1 for any given sunrise and sunset time with sunrise and sunset obviously equaling -1 and high noon equaling 1.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Your apparent sunrise/sunset depends on your altitude and the altitudes of what's on the horizon (not to mention what's in between you and there).

    And then you need an astromony model to determine where the sun is relative to the earth on a specific date at a specific time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts