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: help

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2005
    Location
    florida
    Posts
    3

    help

    Hey guys i need help trying to do this excersize. I can make all the objects like spheres and stuff but what i really need help with is

    HOW do i INTERACT with the user to do these things??

    PLEASE help ive been searching and cant find anything for the past 7.3234 hours

    Let’s say you use glortho(-5, 5, -5, 5, -5, 5). Build an interactive graphics modeling, rendering,
    and animation system that includes at least the following functions on command line or
    GUI control:
    1. it accepts the following commands interactively to construct objects:
    sph radius (depth) // create-draw a sphere object, depth is an option
    // here object is an id you give to this created sph
    cone radius height (depth) // depth is an option with default=3
    cyl radius height (depth) // cylinder
    tri x0 y0 z0 x1 y1 z1 x2 y2 z2 // triangle

    2. it manipulates objects by the following commands:
    sel object // select the object for operation
    unsel object // operations will not affect the unselected object
    del object // remove the object from the data structure
    // you can use mouse to select or unselect directly
    trans x y z // translate all the selected objects
    rot angle x y z
    scale x y z
    // you can use sliderbars for transformation

    3. it draws object(s) with the following rendering commands:
    color r g b // set the current foreground color
    bgcolor r g b // set the background color
    wire // change the selected objects into wireframe
    solid // change the selected objects into solid

    4. it renders objects with the following shading commands:
    lp x y z w // light source position-orientation
    la r g b // light source ambient component
    ld r g b // light source diffuse component
    ls r g b // light source specular componet
    labs r g b // light source ambient, diffuse, & specular are the same
    ma r g b // mat. ambient specified for the selected objects
    md r g b // diffuse
    ms r g b s // specular, here s stands for shininess
    mads r g b s // material ambient, diffuse, and specular are the same
    me r g b // emission

    5. create an environment that has any of the following effects:
    transparency, fog, texture, shadow, or simply an interesting
    animation.
    patience is a virtual

  2. #2
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    4,388

    Re: help

    Moving to beginners section.

  3. #3
    Intern Contributor
    Join Date
    Feb 2004
    Location
    Dallas/ Nottingham
    Posts
    96

    Re: help

    Try the examples at

    http://nehe.gamedev.net/

Posting Permissions

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