{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

primitives

# primitives - CAP4730 Computational Structures in Computer...

This preview shows pages 1–7. Sign up to view the full content.

CAP4730: Computational Structures in Computer Graphics Portions obtained from Leonard McMillan’s COMP136 Notes: www.cs.unc.edu/~mcmillan/comp136/Lecture 6 2D Basics, Line Drawing, and Clipping

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Definitions CG API – Computer Graphics Application Programming Interface (OpenGL, DirectX) Graphics primitives – functions in the API that describe picture components How could we describe an object? Typically focus on object shape Define an object’s shape with geometric primitives Span of primitives are defined by the API What are some types? Lines, Triangles, Quadrics, Conic sections, Curved surfaces
Two Dimensional Images Use Cartesian coordinates We label the two axes as X (horizontal) Y (vertical) Origin is in the lower left How big is the space? So what is the image we see on a screen? We call this space the world coordinate system X Axis Y Axis (0,0) +X +Y

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Partition the space into pixels 1. Define a set of points (vertices) in 2D space. 2. Given a set of vertices, draw lines between consecutive vertices. 3. If you were writing OpenGL yourself, let’s talk about low level calls 4. What about 2D vs 3D? Screen Coordinates – references to frame buffer locations Q: True or Flase: Screen Coordinates == World Coordinates +X +Y (2,1) (2,7) (9,1) (9,7)
Pixels ?=glSetPixel(?) ?=glGetPixel(?) Scan line number – y Column number – x

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Absolute and Relative Coordinate Specifications Absolute coordinates
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 27

primitives - CAP4730 Computational Structures in Computer...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online