Computer Notes - 3D Concepts
Computer Notes - 3D Concepts
com)
3D Concepts
Welcome! You are about to embark on a journey into the wondrous world of threedimensional computer graphics. Before we take the plunge into esoteric 3D jargon and
mathematical principles (as we will in the next lectures), lets have a look at what the buzzword 3D actually means. We have heard the term 3D applied to everything from games to the World Wide Web to Microsofts new look for Windows XP. The term 3D is often confusing because games (and other applications) which claim to be 3D, are not really 3D. In a 3D medium, each of our eyes views the scene from slightly different angles. This is the way we perceive the real world. Obviously, the flat monitors most of us use when playing 3D games 3D applications cant do this. However, some Virtual Reality (VR) glasses have this capability by using a separate TV-like screen for each eye. These VR glasses may become common place some years from now, but today, they are not the norm. Thus, for present-day usage, we can define 3D to mean something using a three-dimensional coordinate system. A three-dimensional coordinate system is just a fancy term for a system that measures objects with width, height, and depth (just like the real world). Similarly, 2-dimensional coordinate systems measure objects with width and height --- ignoring depth properties (so unlike the real world).
168
(ecomputernotes.com)
Direction and magnitude along a single axis, with reference to an origin Locations are defined by a single coordinate Can define points, segments, lines, rays
169
(ecomputernotes.com)
Can have multiple origins (frames of reference) and transform coordinates among them
Direction and magnitude along two axes, with reference to an origin Locations are defined by x, y coordinate pairs Can define points, segments, lines, rays, curves, polygons, (any planar geometry)
Can have multiple origins (frames of reference and transform coordinates among
them
3D Cartesian coordinate systems Direction and magnitude along three axes, with reference to an origin Locations are defined by x, y, z triples Can define cubes, cones, spheres, etc., (volumes in space) in addition to all oneand two-dimensional entities Can have multiple origins (frames of reference) and transform coordinates among them 170
(ecomputernotes.com)
Determines orientation of axes and direction of rotations Thumb = pos x, Index up = pos y, Middle out = pos z Most world and object axes tend to be right handed Left handed axes often are used for cameras
171
(ecomputernotes.com)
Right handed Cartesian coordinate system describes the relationship of the X,Y, and Z in the following manner: X is positive to the right of the origin, and negative to the left. Y is positive above the origin, and negative below it. Z is negative beyond the origin, and positive behind it.
Origin
+Y North -Z
+X
West
East
+Z Sout
(ecomputernotes.com)
172
+X East
West
Sout -Z
Left handed Cartesian coordinate system describes the relationship of the X, Y and Z in the following manner: X is positive to the right of the origin, and negative to the left. Y is positive above the origin, and negative below it. Z is positive beyond the origin, and negative behind it.
173
(ecomputernotes.com)
z-up typically used by designers y-up typically used by animators orientation by profession supposedly derives from past work habits often handled differently when moving from application to application
Local coordinate systems can be defined with respect to global coordinate system Locations can be relative to any of these coordinate systems Locations can be translated or "transformed" from one coordinate system to another.
In fact, there usually are multiple coordinate systems within any 3-D screen Application data will be transformed among the various coordinate systems, depending on what's to be accomplished during program execution Individual coordinate systems often are hierarchically linked within the scene
northward, 65 degrees upward, and travel 7.47 feet along this line. As you can see, this
is less intuitive in a real world setting. And if you try to work out the math, it is harder to manipulate (when we get to the sections that move points around). Because such polar
coordinates are difficult to control, they are generally not used in 3D graphics.
snippet: typedef struct _CPU{ POINT3D center; // the center of the CPU, in World coordinates POINT3D coord[8]; // the 8 corners of the CPU box relative to the center point }CPU; In next lectures we will learn how we can show 3D point on 2D computer screen.
176
(ecomputernotes.com)
Primitives
Primitives are the fundamental geometric entities within a given data structure.
177
(ecomputernotes.com)
Meshes also provide continuity across surfaces which is important for shading calculations
178
(ecomputernotes.com)
3D shapes are represented by polygonal meshes that define or approximate geometric surfaces.
application.
process.
Sampling - The process of selecting a representative but finite number of values along a
continuous function sufficient to render a reasonable approximation of the function for the task at hand.
179
(ecomputernotes.com)
Surface normals are used to determine visibility and in the calculation of shading values (among other things)
concave.
Concave polygons can cause problems during rendering (e.g. tears, etc., in
apparent surface).
180
(ecomputernotes.com)
Polygons consisting of non-co-planar vertices can cause problems when rendering (e.g. visible tearing of the surface, etc.)
With quad meshes, for example, vertices within polygons can be inadvertently transformed into non-co-planer positions during modeling or animation
transformations.
With triangle meshes, all polygons are triangles and therefore all vertices within
order descriptions.
181
(ecomputernotes.com)
16.10
Surface models
Here is brief over view of surface models: Surfaces can be constructed from mathematical descriptions Resolution independent - surfaces can be tessellated at rendering with an appropriate level of approximation for current display devices and/or viewing parameters Tessellation can be adaptive to the local degree of curvature of a surface.
Primitives
Free-form surfaces can be built from curves Construction history, while also used in polygonal modeling, can be particularly useful with curve and surface modeling techniques.
182
(ecomputernotes.com)
Parameterization
(ecomputernotes.com)
183
For placing texture maps, etc. For locating trimming curves, etc.
Potential functions (usually radially symmetric Gaussian functions) are used to define surfaces surrounding points
184
(ecomputernotes.com)
Lighting Effects
Texture Mapping:
The texture mapping is of the following types that we will be studying in our coming lectures on 3D: 1. 2. 3. 4. 5. 6. 7. Perfect Mapping: Affine Mapping Area Subdivision Scan-line Subdivision Parabolic Mapping Hyperbolic Mapping Constant-Z Mapping
185
(ecomputernotes.com)