Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: How to generate texture-coordinates for a geosphere

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Germany
    Posts
    24

    How to generate texture-coordinates for a geosphere

    Hello,

    i need to calculate texture-coordinates for a geosphere, not a sphere with latitude and longitude lines. The geosphere approximates a sphere based on an icosahedron by subdividing triangles. So the points are not lying on latitude and longitude lines. Does someone know how to do this ?

    Best regards

    tabor25

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Feb 2001
    Location
    Switzerland
    Posts
    1,594

    Re: How to generate texture-coordinates for a geosphere

    get the latitude and longitude of the sphere.. transform your xyz to a spherical coordinate system and use these
    http://davepermen.net - if i could stay true to my heart, i would feel totally free

  3. #3
    Intern Contributor
    Join Date
    Dec 2001
    Posts
    92

    Re: How to generate texture-coordinates for a geosphere

    Transform your points (x, y, z) into spherial polar coordinates (r, theta, phi), then map (theta, phi) onto (u, v).

    You have to be a bit careful with triangles which overlap the wrap-round of theta (ie. where theta > 2*PI).

Posting Permissions

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