Drawing Sphere in Cocoa OpenGL

Discussion in 'Mac Programming' started by hoschi, Oct 20, 2005.

  1. hoschi
    Expand Collapse
    macrumors newbie

    Joined:
    Sep 20, 2005
    #1
    Wonder how to draw a sphere which I can center anywhere in the window and not just centered at the origin..

    Thanks in advance
     
  2. Artful Dodger
    Expand Collapse
    macrumors 68020

    Artful Dodger

    Joined:
    May 28, 2004
    Location:
    In a false sense of reality...My Mind!
    #2
    One like this? sorry didn't see the cocoa part, my bad :eek:
     

    Attached Files:

    • 573.jpg
      573.jpg
      File size:
      14.5 KB
      Views:
      1,838
    • 575.jpg
      575.jpg
      File size:
      14.8 KB
      Views:
      1,842
  3. hoschi
    Expand Collapse
    thread starter macrumors newbie

    Joined:
    Sep 20, 2005
    #3
    right.. something like that...
     
  4. HiRez
    Expand Collapse
    macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #4
    You can apply a translation transformation to move the sphere away from the origin, or change the view matrix (IOW, move the camera off-center so it's not looking directly at a sphere at the origin). Not sure if you're asking something different because you did mention "Cocoa OpenGL" specifically, but for most things it's the same as any OpenGL.
     

Share This Page