Results 1 to 4 of 4

Thread: Sphere

  1. #1
    Senior Member Regular Contributor
    Join Date
    Mar 2003
    Location
    Slovakia
    Posts
    108

    Sphere

    when I draw a sphere into 640*480 window it doesn't look like sphere - it looks like elipsoid (?) .how to fix that ? (i dont want to resize the window)

  2. #2
    Member Contributor
    Join Date
    Apr 2004
    Posts
    73

    Re: Sphere

    I don't understand how can see an elipsoid because normaly your computer screen is in 4/3 format and 640x480 too ...

    See you the result on a 16/9 TV screen ?
    If it's the case, you have to draw yourself an elipsoid for to view a true sphere on your 16/9 screen (or make a glScale call for resizing the X, Y and Z axes of your sphere, I haven't here the goods sx,sy,sz values for this call but it isn't very hard to find).

    On another side, perhaps this can be the result on a bad matrix manipulation ...

    @+
    Cyclone
    @+
    Yannoo

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: Sphere

    You gotta specify the aspect ratio in glViewport (which is 1.33333... on 4/3 window) and then setup a Projection matrix (See gluPerspective for this).

  4. #4
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: Sphere

    Hi !

    Make sure that you set the aspect ratio correct in your resize "handler"

    gluPerspective(), if you are using it.

    Mikael

Similar Threads

  1. Render a trimmed sphere ? (a quarter of sphere)
    By HaVyThoai in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-07-2007, 12:05 PM
  2. About lod on a sphere
    By romb in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 12-09-2003, 04:14 AM
  3. OT : Sphere map...
    By Allan Walton in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 05-14-2003, 06:34 AM
  4. Sphere-sphere collision detection
    By Billy Lee in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-08-2003, 11:03 AM
  5. Sphere
    By abhiboy007 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-11-2001, 01:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean