cs770 870 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
CS770/870 PowerPoint Presentation
Download Presentation
CS770/870

Loading in 2 Seconds...

play fullscreen
1 / 6

CS770/870 - PowerPoint PPT Presentation


  • 147 Views
  • Uploaded on

CS770/870. Class 5. Assignment 2. Create an articulated mannequin Has body, head Two arms with elbow joint Hand. Some basic 3D setup commands. glFrustum ( Left,Right , Bottom, Top, Near, Far); float light_position [] = {-10.0,20.0,20.0,1.0};

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'CS770/870' - deanne


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
cs770 870

CS770/870

Class 5

assignment 2
Assignment 2

Create an articulated mannequin

Has body, head

Two arms with elbow joint

Hand

some basic 3d setup commands
Some basic 3D setup commands
  • glFrustum(Left,Right, Bottom, Top, Near, Far);
  • float light_position[] = {-10.0,20.0,20.0,1.0};
  • glLightfv(GL_LIGHT0,GL_POSITION, light_position);
  • glEnable(GL_COLOR_MATERIAL);
    • This allows you to color basic glut objects (sphere, cube)
  • glEnable(GL_LIGHTING);
  • glEnable(GL_NORMALIZE);
    • This enables you to scale a cube without messing up lighting
    • Why?
  • glutSolid Sphere(rad, lat, lon);
  • glutSolidCube(size);
gl projection
GL_PROJECTION

GL_PROJECTION

GL_MODELVIEW

M  P Mv

The only difference between Projection (P) and Modelview (Mv) is that you cannot pop P off the stack, and

P is always applied.

A RIGHT HANDED COORDINATE SYSTEM

order of rotations
Order of rotations

To rotate around an arbitrary point on an object and not have it move.

Must translate to the center of rotation, rotate, translate back again. (Beware of scales)

All rotations occur in your initial frame of reference

+ looking a positive direction along an axis.

Exercise

use of matrix stack
Use of Matrix Stack.
  • Push
    • Rotate Torso
    • Draw Torso
    • Push
      • Translate, Rotate and draw Right arm
      • + Deal with forearm and hand (more pushes and pops)
    • Pop
    • Push
      • Translate, Rotate and draw Right arm
      • +Deal with forearm and hand
    • Pop
  • Pop